linux/Documentation/RCU
Paul E. McKenney e4cc1f22b2 rcu: Simplify quiescent-state accounting
There is often a delay between the time that a CPU passes through a
quiescent state and the time that this quiescent state is reported to the
RCU core.  It is quite possible that the grace period ended before the
quiescent state could be reported, for example, some other CPU might have
deduced that this CPU passed through dyntick-idle mode.  It is critically
important that quiescent state be counted only against the grace period
that was in effect at the time that the quiescent state was detected.

Previously, this was handled by recording the number of the last grace
period to complete when passing through a quiescent state.  The RCU
core then checks this number against the current value, and rejects
the quiescent state if there is a mismatch.  However, one additional
possibility must be accounted for, namely that the quiescent state was
recorded after the prior grace period completed but before the current
grace period started.  In this case, the RCU core must reject the
quiescent state, but the recorded number will match.  This is handled
when the CPU becomes aware of a new grace period -- at that point,
it invalidates any prior quiescent state.

This works, but is a bit indirect.  The new approach records the current
grace period, and the RCU core checks to see (1) that this is still the
current grace period and (2) that this grace period has not yet ended.
This approach simplifies reasoning about correctness, and this commit
changes over to this new approach.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2011-09-28 21:38:22 -07:00
..
00-INDEX rcu: Remove conditional compilation for RCU CPU stall warnings 2011-05-05 23:16:54 -07:00
arrayRCU.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
checklist.txt rcu: document ways of stalling updates in low-memory situations 2010-08-20 09:00:14 -07:00
listRCU.txt Doc: Fix wrong API example usage of call_rcu(). 2009-04-02 01:33:50 -07:00
lockdep.txt rcu: Update docs for rcu_access_pointer and rcu_dereference_protected 2010-04-14 12:20:12 +02:00
NMI-RCU.txt rcu: Fix RCU's NMI documentation 2011-09-28 21:36:44 -07:00
rcu.txt rcu: 1Q2010 update for RCU documentation 2010-01-16 10:25:22 +01:00
rcubarrier.txt rcu: Add synchronize_sched_expedited() rcutorture doc + updates 2009-07-03 10:02:29 +02:00
rculist_nulls.txt netfilter: nf_conntrack: nf_conntrack_alloc() fixes 2009-07-16 14:03:40 +02:00
rcuref.txt doc/RCU: fix pseudocode in rcuref.txt 2008-09-10 08:36:07 +02:00
RTFP.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
stallwarn.txt rcu: Remove conditional compilation for RCU CPU stall warnings 2011-05-05 23:16:54 -07:00
torture.txt rcu: Catch rcutorture up to new RCU API additions 2011-09-28 21:36:43 -07:00
trace.txt rcu: Simplify quiescent-state accounting 2011-09-28 21:38:22 -07:00
UP.txt rcu: Add synchronize_sched_expedited() rcutorture doc + updates 2009-07-03 10:02:29 +02:00
whatisRCU.txt rcu: add documentation saying which RCU flavor to choose 2011-03-04 08:05:25 -08:00