[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190730131653.GA14277@pauld.bos.csb>
Date: Tue, 30 Jul 2019 09:16:54 -0400
From: Phil Auld <pauld@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...nel.org, juri.lelli@...hat.com,
linux-kernel@...r.kernel.org, dietmar.eggemann@....com,
luca.abeni@...tannapisa.it, bristot@...hat.com,
balsini@...roid.com, dvyukov@...gle.com, tglx@...utronix.de,
vpillai@...italocean.com, rostedt@...dmis.org,
Valentin Schneider <valentin.schneider@....com>,
Aaron Lu <aaron.lwe@...il.com>, keescook@...omium.org,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
torvalds@...ux-foundation.org,
Tim Chen <tim.c.chen@...ux.intel.com>, fweisbec@...il.com,
subhra.mazumdar@...cle.com,
Julien Desfossez <jdesfossez@...italocean.com>, pjt@...gle.com,
Nishanth Aravamudan <naravamudan@...italocean.com>,
Aubrey Li <aubrey.intel@...il.com>,
Mel Gorman <mgorman@...hsingularity.net>, kerrnel@...gle.com,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [RFC][PATCH 02/13] stop_machine: Fix stop_cpus_in_progress
ordering
On Fri, Jul 26, 2019 at 04:54:11PM +0200 Peter Zijlstra wrote:
> Make sure the entire for loop has stop_cpus_in_progress set.
>
> Cc: Valentin Schneider <valentin.schneider@....com>
> Cc: Aaron Lu <aaron.lwe@...il.com>
> Cc: keescook@...omium.org
> Cc: mingo@...nel.org
> Cc: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
> Cc: Phil Auld <pauld@...hat.com>
> Cc: torvalds@...ux-foundation.org
> Cc: Tim Chen <tim.c.chen@...ux.intel.com>
> Cc: fweisbec@...il.com
> Cc: subhra.mazumdar@...cle.com
> Cc: tglx@...utronix.de
> Cc: Julien Desfossez <jdesfossez@...italocean.com>
> Cc: pjt@...gle.com
> Cc: Nishanth Aravamudan <naravamudan@...italocean.com>
> Cc: Aubrey Li <aubrey.intel@...il.com>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: kerrnel@...gle.com
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Link: https://lkml.kernel.org/r/0fd8fd4b99b9b9aa88d8b2dff897f7fd0d88f72c.1559129225.git.vpillai@digitalocean.com
> ---
> kernel/stop_machine.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- a/kernel/stop_machine.c
> +++ b/kernel/stop_machine.c
> @@ -383,6 +383,7 @@ static bool queue_stop_cpus_work(const s
> */
> preempt_disable();
> stop_cpus_in_progress = true;
> + barrier();
> for_each_cpu(cpu, cpumask) {
> work = &per_cpu(cpu_stopper.stop_work, cpu);
> work->fn = fn;
> @@ -391,6 +392,7 @@ static bool queue_stop_cpus_work(const s
> if (cpu_stop_queue_work(cpu, work))
> queued = true;
> }
> + barrier();
> stop_cpus_in_progress = false;
> preempt_enable();
>
>
>
This looks good.
Reviewed-by: Phil Auld <pauld@...hat.com>
--
Powered by blists - more mailing lists