summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-08-04 06:59:03 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-28 21:38:37 -0700
commit5c51dd7349d4bb26f845f17f85daa168f5fa03f2 (patch)
treea846bf11cb973e8d0bb28d9c07653663759fb6c8 /kernel/rcutree.c
parent4627e240dfee4a0a46a58010b1b721b4ded1918f (diff)
downloadlinux-5c51dd7349d4bb26f845f17f85daa168f5fa03f2.tar.gz
linux-5c51dd7349d4bb26f845f17f85daa168f5fa03f2.tar.bz2
linux-5c51dd7349d4bb26f845f17f85daa168f5fa03f2.zip
rcu: Prevent early boot set_need_resched() from __rcu_pending()
There isn't a whole lot of point in poking the scheduler before there are other tasks to switch to. This commit therefore adds a check for rcu_scheduler_fully_active in __rcu_pending() to suppress any pre-scheduler calls to set_need_resched(). The downside of this approach is additional runtime overhead in a reasonably hot code path. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index a07bf553e02a..0051dbf6958e 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1707,7 +1707,8 @@ static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp)
check_cpu_stall(rsp, rdp);
/* Is the RCU core waiting for a quiescent state from this CPU? */
- if (rdp->qs_pending && !rdp->passed_quiesce) {
+ if (rcu_scheduler_fully_active &&
+ rdp->qs_pending && !rdp->passed_quiesce) {
/*
* If force_quiescent_state() coming soon and this CPU