]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
rcu: Move end of special early-boot RCU operation earlier
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 2 Sep 2009 21:01:24 +0000 (14:01 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 4 Sep 2009 07:29:34 +0000 (09:29 +0200)
Ingo was getting warnings from rcu_scheduler_starting()
indicating that context switches had occurred before RCU ended
its special early-boot handling of grace periods.

This is a dangerous condition, as it indicates that RCU might
have prematurely ended grace periods.  This exploratory fix
moves rcu_scheduler_starting() earlier in boot.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
init/main.c

index 11f4f145be3fd9461cfdcd9ee1087c30fa1c48c8..525f6fb2bd2294aa8ffa109b6c9d249fcbb3fcea 100644 (file)
@@ -451,6 +451,7 @@ static noinline void __init_refok rest_init(void)
 {
        int pid;
 
+       rcu_scheduler_starting();
        kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
        numa_default_policy();
        pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
@@ -462,7 +463,6 @@ static noinline void __init_refok rest_init(void)
         * at least once to get things moving:
         */
        init_idle_bootup_task(current);
-       rcu_scheduler_starting();
        preempt_enable_no_resched();
        schedule();
        preempt_disable();