linux/kernel/rcu
Paul E. McKenney ac1bea8578 sched,rcu: Make cond_resched() report RCU quiescent states
Given a CPU running a loop containing cond_resched(), with no
other tasks runnable on that CPU, RCU will eventually report RCU
CPU stall warnings due to lack of quiescent states.  Fortunately,
every call to cond_resched() is a perfectly good quiescent state.
Unfortunately, invoking rcu_note_context_switch() is a bit heavyweight
for cond_resched(), especially given the need to disable preemption,
and, for RCU-preempt, interrupts as well.

This commit therefore maintains a per-CPU counter that causes
cond_resched(), cond_resched_lock(), and cond_resched_softirq() to call
rcu_note_context_switch(), but only about once per 256 invocations.
This ratio was chosen in keeping with the relative time constants of
RCU grace periods.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14 09:46:11 -07:00
..
Makefile rcutorture: Abstract rcu_torture_random() 2014-02-23 09:00:58 -08:00
rcu.h rcu: Ensure kernel/rcu/rcu.h can be sourced/used stand-alone 2014-02-26 06:35:18 -08:00
rcutorture.c rcutorture: Export RCU grace-period kthread wait state to rcutorture 2014-05-14 09:46:09 -07:00
srcu.c rcu: Ensure kernel/rcu/rcu.h can be sourced/used stand-alone 2014-02-26 06:35:18 -08:00
tiny_plugin.h rcu: Stop tracking FSF's postal address 2014-02-17 15:01:37 -08:00
tiny.c rcu: Ensure kernel/rcu/rcu.h can be sourced/used stand-alone 2014-02-26 06:35:18 -08:00
tree_plugin.h Merge branches 'doc.2014.02.24a', 'fixes.2014.02.26a' and 'rt.2014.02.17b' into HEAD 2014-02-26 06:36:09 -08:00
tree_trace.c rcu: Stop tracking FSF's postal address 2014-02-17 15:01:37 -08:00
tree.c rcutorture: Export RCU grace-period kthread wait state to rcutorture 2014-05-14 09:46:09 -07:00
tree.h rcutorture: Export RCU grace-period kthread wait state to rcutorture 2014-05-14 09:46:09 -07:00
update.c sched,rcu: Make cond_resched() report RCU quiescent states 2014-05-14 09:46:11 -07:00