Commit 7db905e6 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Ingo Molnar

rcu: Move end of special early-boot RCU operation earlier

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 29e2035b
...@@ -451,6 +451,7 @@ static noinline void __init_refok rest_init(void) ...@@ -451,6 +451,7 @@ static noinline void __init_refok rest_init(void)
{ {
int pid; int pid;
rcu_scheduler_starting();
kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
numa_default_policy(); numa_default_policy();
pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
...@@ -462,7 +463,6 @@ static noinline void __init_refok rest_init(void) ...@@ -462,7 +463,6 @@ static noinline void __init_refok rest_init(void)
* at least once to get things moving: * at least once to get things moving:
*/ */
init_idle_bootup_task(current); init_idle_bootup_task(current);
rcu_scheduler_starting();
preempt_enable_no_resched(); preempt_enable_no_resched();
schedule(); schedule();
preempt_disable(); preempt_disable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment