rcu: Fix RCU & CPU hotplug hang
Commit-ID: 04b06256ccdd0af50ece04530f7dde0f81aa8f46 Gitweb: http://git.kernel.org/tip/04b06256ccdd0af50ece04530f7dde0f81aa8f46 Author: Paul E. McKenney <[email protected]> AuthorDate: Fri, 31 Jul 2009 23:25:50 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 2 Aug 2009 16:08:47 +0200
rcu: Fix RCU & CPU hotplug hang
This patch divides the rcutree initialization into boot-time and hotplug-time components, so that the tree data structures are guaranteed to be fully linked at boot time regardless of what might happen in CPU hotplug operations.
This should prevent the noted panic, but then again so should the pre-patch setup...
Reported-by Ingo Molnar <[email protected]>
Signed-off-by Paul E. McKenney <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/rcupdate.c | 12 +++++++++- kernel/rcupreempt.c | 9 ------- kernel/rcutree.c | 62 +++++++++++++++++++++++++++----------------------- 3 files changed, 44 insertions(+), 39 deletions(-)
kernel/rcupdate.c +11 -1
@@ -248,8 +248,18 @@ static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self,void __init rcu_init (void ) { -hotcpu_notifier (rcu_barrier_cpu_hotplug,0 ); +int i; +__rcu_init (); +hotcpu_notifier (rcu_barrier_cpu_hotplug,0 ); + +/* +* We don't need protection against CPU-hotplug here because +* this is called early in boot, before either interrupts +* or the scheduler are operational. +*/ +for_each_online_cpu (i) +rcu_barrier_cpu_hotplug (NULL ,CPU_UP_PREPARE , (void *)(long )i); }void rcu_scheduler_starting (void )
kernel/rcupreempt.c +0 -9
@@ -1467,15 +1467,6 @@ void __init __rcu_init(void) rdp->waitschedtail = &rdp->waitschedlist; rdp->rcu_sched_sleeping =0 ; } - -/* -* We don't need protection against CPU-hotplug here because -* this is called early in boot, before either interrupts -* or the scheduler are operational. -*/ -for_each_online_cpu (cpu) -rcu_cpu_notify (NULL ,CPU_UP_PREPARE , (void *)(long ) cpu); -open_softirq (RCU_SOFTIRQ , rcu_process_callbacks); }
kernel/rcutree.c +33 -29
88 lines not on this page · raw message