[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-cdcb496b285dc8e9c544107d42bd60e5bc2feffa@git.kernel.org>
Date: Thu, 20 Apr 2017 04:25:28 -0700
From: tip-bot for Sebastian Andrzej Siewior <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, bigeasy@...utronix.de, hpa@...or.com,
mingo@...nel.org, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org
Subject: [tip:smp/hotplug] cpu/hotplug: Use stop_machine_cpuslocked() in
takedown_cpu()
Commit-ID: cdcb496b285dc8e9c544107d42bd60e5bc2feffa
Gitweb: http://git.kernel.org/tip/cdcb496b285dc8e9c544107d42bd60e5bc2feffa
Author: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Tue, 18 Apr 2017 19:04:56 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 20 Apr 2017 13:08:55 +0200
cpu/hotplug: Use stop_machine_cpuslocked() in takedown_cpu()
takedown_cpu() is a cpu hotplug function invoking stop_machine(). The cpu
hotplug machinery holds the hotplug lock for write.
stop_machine() invokes get_online_cpus() as well. This is correct, but
prevents the conversion of the hotplug locking to a percpu rwsem.
Use stop_machine_cpuslocked() to avoid the nested call.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Link: http://lkml.kernel.org/r/20170418170553.531067939@linutronix.de
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 92e5a91..f932e68 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -701,7 +701,7 @@ static int takedown_cpu(unsigned int cpu)
/*
* So now all preempt/rcu users must observe !cpu_active().
*/
- err = stop_machine(take_cpu_down, NULL, cpumask_of(cpu));
+ err = stop_machine_cpuslocked(take_cpu_down, NULL, cpumask_of(cpu));
if (err) {
/* CPU refused to die */
irq_unlock_sparse();
Powered by blists - more mailing lists