public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead•org>
To: Yair Podemsky <ypodemsk@redhat•com>
Cc: geert+renesas@glider•be, tony@atomide•com,
	linus.walleij@linaro•org, dave.hansen@linux•intel.com,
	sebastian.reichel@collabora•com, linux-mm@kvack•org,
	hpa@zytor•com, sparclinux@vger•kernel.org,
	agordeev@linux•ibm.com, will@kernel•org, ardb@kernel•org,
	linux-arch@vger•kernel.org, linux-s390@vger•kernel.org,
	vschneid@redhat•com, gor@linux•ibm.com,
	aneesh.kumar@linux•ibm.com, x86@kernel•org,
	linux@armlinux•org.uk, mingo@redhat•com, samitolvanen@google•com,
	juerg.haefliger@canonical•com, borntraeger@linux•ibm.com,
	frederic@kernel•org, keescook@chromium•org, paulmck@kernel•org,
	hca@linux•ibm.com, npiggin@gmail•com, rmk+kernel@armlinux•org.uk,
	bp@alien8•de, nick.hawkins@hpe•com, tglx@linutronix•de,
	jpoimboe@kernel•org, linux-arm-kernel@lists•infradead.org,
	alougovs@redhat•com, mtosatti@redhat•com,
	linux-kernel@vger•kernel.org, arnd@arndb•de, svens@linux•ibm.com,
	dhildenb@redhat•com, akpm@linux-foundation•org,
	linuxppc-dev@lists•ozlabs.org, davem@davemloft•net
Subject: Re: [PATCH 2/3] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs
Date: Tue, 4 Apr 2023 16:57:51 +0200	[thread overview]
Message-ID: <20230404145751.GA297936@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20230404134224.137038-3-ypodemsk@redhat.com>

On Tue, Apr 04, 2023 at 04:42:23PM +0300, Yair Podemsky wrote:
> diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c
> index 2b93cf6ac9ae..5ea9be6fb87c 100644
> --- a/mm/mmu_gather.c
> +++ b/mm/mmu_gather.c
> @@ -191,7 +191,13 @@ static void tlb_remove_table_smp_sync(void *arg)
>  	/* Simply deliver the interrupt */
>  }
>  
> -void tlb_remove_table_sync_one(void)
> +#ifdef CONFIG_ARCH_HAS_CPUMASK_BITS
> +#define REMOVE_TABLE_IPI_MASK mm_cpumask(mm)
> +#else
> +#define REMOVE_TABLE_IPI_MASK NULL
> +#endif /* CONFIG_ARCH_HAS_CPUMASK_BITS */
> +
> +void tlb_remove_table_sync_one(struct mm_struct *mm)
>  {
>  	/*
>  	 * This isn't an RCU grace period and hence the page-tables cannot be
> @@ -200,7 +206,8 @@ void tlb_remove_table_sync_one(void)
>  	 * It is however sufficient for software page-table walkers that rely on
>  	 * IRQ disabling.
>  	 */
> -	smp_call_function(tlb_remove_table_smp_sync, NULL, 1);
> +	on_each_cpu_mask(REMOVE_TABLE_IPI_MASK, tlb_remove_table_smp_sync,
> +			NULL, true);
>  }

Uhh, I don't think NULL is a valid @mask argument. Should that not be
something like:

#ifdef CONFIG_ARCH_HAS_CPUMASK
#define REMOVE_TABLE_IPI_MASK mm_cpumask(mm)
#else
#define REMOVE_TABLE_IPI_MASK cpu_online_mask
#endif

	preempt_disable();
	on_each_cpu_mask(REMOVE_TABLE_IPI_MASK, tlb_remove_table_smp_sync, NULL true);
	preempt_enable();


?

  reply	other threads:[~2023-04-04 14:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 13:42 [PATCH 0/3] send tlb_remove_table_smp_sync IPI only to necessary CPUs Yair Podemsky
2023-04-04 13:42 ` [PATCH 1/3] arch: Introduce ARCH_HAS_CPUMASK_BITS Yair Podemsky
2023-04-04 13:47   ` David Hildenbrand
2023-04-04 13:42 ` [PATCH 2/3] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs Yair Podemsky
2023-04-04 14:57   ` Peter Zijlstra [this message]
2023-04-04 13:42 ` [PATCH 3/3] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to CPUs in kernel mode Yair Podemsky
2023-04-04 14:03   ` David Hildenbrand
2023-04-04 15:12   ` Peter Zijlstra
2023-04-04 16:00     ` Peter Zijlstra
2023-04-05 10:43   ` Frederic Weisbecker
2023-04-05 11:10     ` Frederic Weisbecker
2023-04-05 11:41       ` Peter Zijlstra
2023-04-05 12:00         ` David Hildenbrand
2023-04-05 12:05         ` Frederic Weisbecker
2023-04-05 12:31           ` Frederic Weisbecker
2023-04-05 12:45           ` Valentin Schneider
2023-04-06 13:38             ` Peter Zijlstra
2023-04-06 14:11               ` Valentin Schneider
2023-04-06 14:39                 ` Peter Zijlstra
2023-04-05 19:45       ` Marcelo Tosatti
2023-04-05 19:52         ` Peter Zijlstra
2023-04-06 12:38           ` Marcelo Tosatti
2023-04-06 13:29             ` Peter Zijlstra
2023-04-06 14:04               ` Peter Zijlstra
2023-04-06 14:42                 ` David Hildenbrand
2023-04-06 15:06                   ` Peter Zijlstra
2023-04-06 15:02                 ` Peter Zijlstra
2023-04-06 15:51                   ` David Hildenbrand
2023-04-06 18:27                     ` Peter Zijlstra
2023-04-19 11:30                       ` David Hildenbrand
2023-04-19 11:39                         ` Marcelo Tosatti
2023-04-05 19:43     ` Marcelo Tosatti
2023-04-05 19:54       ` Peter Zijlstra
2023-04-06 12:49         ` Marcelo Tosatti
2023-04-06 13:32           ` Peter Zijlstra
2023-04-19 11:01             ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230404145751.GA297936@hirez.programming.kicks-ass.net \
    --to=peterz@infradead$(echo .)org \
    --cc=agordeev@linux$(echo .)ibm.com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=alougovs@redhat$(echo .)com \
    --cc=aneesh.kumar@linux$(echo .)ibm.com \
    --cc=ardb@kernel$(echo .)org \
    --cc=arnd@arndb$(echo .)de \
    --cc=borntraeger@linux$(echo .)ibm.com \
    --cc=bp@alien8$(echo .)de \
    --cc=dave.hansen@linux$(echo .)intel.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=dhildenb@redhat$(echo .)com \
    --cc=frederic@kernel$(echo .)org \
    --cc=geert+renesas@glider$(echo .)be \
    --cc=gor@linux$(echo .)ibm.com \
    --cc=hca@linux$(echo .)ibm.com \
    --cc=hpa@zytor$(echo .)com \
    --cc=jpoimboe@kernel$(echo .)org \
    --cc=juerg.haefliger@canonical$(echo .)com \
    --cc=keescook@chromium$(echo .)org \
    --cc=linus.walleij@linaro$(echo .)org \
    --cc=linux-arch@vger$(echo .)kernel.org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mm@kvack$(echo .)org \
    --cc=linux-s390@vger$(echo .)kernel.org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mingo@redhat$(echo .)com \
    --cc=mtosatti@redhat$(echo .)com \
    --cc=nick.hawkins@hpe$(echo .)com \
    --cc=npiggin@gmail$(echo .)com \
    --cc=paulmck@kernel$(echo .)org \
    --cc=rmk+kernel@armlinux$(echo .)org.uk \
    --cc=samitolvanen@google$(echo .)com \
    --cc=sebastian.reichel@collabora$(echo .)com \
    --cc=sparclinux@vger$(echo .)kernel.org \
    --cc=svens@linux$(echo .)ibm.com \
    --cc=tglx@linutronix$(echo .)de \
    --cc=tony@atomide$(echo .)com \
    --cc=vschneid@redhat$(echo .)com \
    --cc=will@kernel$(echo .)org \
    --cc=x86@kernel$(echo .)org \
    --cc=ypodemsk@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox