[tip:core/rcu] rcu: Move end of special early-boot RCU operation earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  7db905e636f08ea5bc9825c1f73d77802e8ccad5
Gitweb:     http://git.kernel.org/tip/7db905e636f08ea5bc9825c1f73d77802e8ccad5
Author:     Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
AuthorDate: Wed, 2 Sep 2009 14:01:24 -0700
Committer:  Ingo Molnar <mingo@xxxxxxx>
CommitDate: Fri, 4 Sep 2009 09:29:34 +0200

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: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
 init/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init/main.c b/init/main.c
index 11f4f14..525f6fb 100644
--- a/init/main.c
+++ b/init/main.c
@@ -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();
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux