aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-04-15 15:45:41 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-27 15:58:39 -0400
commit64eaf974218d576812919c8b1a8d87ded4e695d9 (patch)
tree81d70a7b65f3da8f6a15669b5da0a81b26a9c59e
parenta738eec6c6082f48cbcf0157fd9f550e286ea04b (diff)
cpu: Handle smpboot_unpark_threads() uniformly
Commit 00df35f99191 (cpu: Defer smpboot kthread unparking until CPU known to scheduler) put the online path's call to smpboot_unpark_threads() into a CPU-hotplug notifier. This commit places the offline-failure paths call into the same notifier for the sake of uniformity. Note that it is not currently possible to place the offline path's call to smpboot_park_threads() into an existing notifier because the CPU_DYING notifiers run in a restricted environment, and the CPU_UP_PREPARE notifiers run too soon. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--kernel/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 94bbe4695232..260eb7db281e 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -398,7 +398,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
398 err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu)); 398 err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu));
399 if (err) { 399 if (err) {
400 /* CPU didn't die: tell everyone. Can't complain. */ 400 /* CPU didn't die: tell everyone. Can't complain. */
401 smpboot_unpark_threads(cpu);
402 cpu_notify_nofail(CPU_DOWN_FAILED | mod, hcpu); 401 cpu_notify_nofail(CPU_DOWN_FAILED | mod, hcpu);
403 goto out_release; 402 goto out_release;
404 } 403 }
@@ -463,6 +462,7 @@ static int smpboot_thread_call(struct notifier_block *nfb,
463 462
464 switch (action & ~CPU_TASKS_FROZEN) { 463 switch (action & ~CPU_TASKS_FROZEN) {
465 464
465 case CPU_DOWN_FAILED:
466 case CPU_ONLINE: 466 case CPU_ONLINE:
467 smpboot_unpark_threads(cpu); 467 smpboot_unpark_threads(cpu);
468 break; 468 break;