[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190726161357.455421817@infradead.org>
Date: Fri, 26 Jul 2019 16:54:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: mingo@...nel.org, juri.lelli@...hat.com
Cc: 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>,
Phil Auld <pauld@...hat.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>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: [RFC][PATCH 02/13] stop_machine: Fix stop_cpus_in_progress ordering
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();
Powered by blists - more mailing lists