diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-01-06 17:11:30 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-02-21 12:03:25 -0500 |
commit | 486e259340fc4c60474f2c14703e3b3634bb58ca (patch) | |
tree | 70a58702194588fa0773463523f72c682785d040 /kernel/rcutree.h | |
parent | 0bb7b59d6e2b8440cd7097097dd4bbfc4d76ed07 (diff) |
rcu: Avoid waking up CPUs having only kfree_rcu() callbacks
When CONFIG_RCU_FAST_NO_HZ is enabled, RCU will allow a given CPU to
enter dyntick-idle mode even if it still has RCU callbacks queued.
RCU avoids system hangs in this case by scheduling a timer for several
jiffies in the future. However, if all of the callbacks on that CPU
are from kfree_rcu(), there is no reason to wake the CPU up, as it is
not a problem to defer freeing of memory.
This commit therefore tracks the number of callbacks on a given CPU
that are from kfree_rcu(), and avoids scheduling the timer if all of
a given CPU's callbacks are from kfree_rcu().
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.h')
-rw-r--r-- | kernel/rcutree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index fddff92d6676..af2af3cc5e65 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h | |||
@@ -265,7 +265,8 @@ struct rcu_data { | |||
265 | */ | 265 | */ |
266 | struct rcu_head *nxtlist; | 266 | struct rcu_head *nxtlist; |
267 | struct rcu_head **nxttail[RCU_NEXT_SIZE]; | 267 | struct rcu_head **nxttail[RCU_NEXT_SIZE]; |
268 | long qlen; /* # of queued callbacks */ | 268 | long qlen_lazy; /* # of lazy queued callbacks */ |
269 | long qlen; /* # of queued callbacks, incl lazy */ | ||
269 | long qlen_last_fqs_check; | 270 | long qlen_last_fqs_check; |
270 | /* qlen at last check for QS forcing */ | 271 | /* qlen at last check for QS forcing */ |
271 | unsigned long n_cbs_invoked; /* count of RCU cbs invoked. */ | 272 | unsigned long n_cbs_invoked; /* count of RCU cbs invoked. */ |