]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Fix endless sync_sched/rcu() loop inside _cpu_down()
authorMichael wang <wangyun@linux.vnet.ibm.com>
Wed, 13 Nov 2013 03:10:56 +0000 (11:10 +0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Nov 2013 12:33:50 +0000 (13:33 +0100)
commitb042743cc88b7e0da36f4af46da424cc865f355d
tree5a83870657588c076e17d59a19a3c27f20fe38cb
parent2af75dd92d16d4e00994b40da727773afac77fb3
sched: Fix endless sync_sched/rcu() loop inside _cpu_down()

Commit 1cc1cf3f0:

sched: Remove get_online_cpus() usage

tries to do sync_sched/rcu() inside _cpu_down() but triggers:

INFO: task swapper/0:1 blocked for more than 120 seconds.
...
[<ffffffff811263dc>] synchronize_rcu+0x2c/0x30
[<ffffffff81d1bd82>] _cpu_down+0x2b2/0x340
...

It was caused by that in the rcu boost case we rely on smpboot thread to
finish the rcu callback, which has already been parked before sync in here
and leads to the endless sync_sched/rcu().

This patch exchanges the sequence of smpboot_park_threads() and
sync_sched/rcu() to fix the bug.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/5282EDC0.6060003@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/cpu.c