D.2.7.3 Announce a Quiescent State to RCU
The afore-mentioned rcu_process_callbacks() function
has several duties:
- Determining when to take measures to end an over-long grace period
(via force_quiescent_state()).
- Taking appropriate action when some other CPU detected the end of
a grace period (via rcu_process_gp_end()).
``Appropriate action`` includes advancing this CPU's
callbacks and recording the new grace period.
This same function updates state in response to some other
CPU starting a new grace period.
- Reporting the current CPU's quiescent states to the core RCU
mechanism (via rcu_check_quiescent_state(), which
in turn invokes cpu_quiet()).
This of course might mark the end of the current grace period.
- Starting a new grace period if there is no grace period in progress
and this CPU has RCU callbacks still waiting for a grace period
(via cpu_needs_another_gp() and
rcu_start_gp()).
- Invoking any of this CPU's callbacks whose grace period has ended
(via rcu_do_batch()).
These interactions are carefully orchestrated in order to avoid
buggy behavior such as reporting a quiescent state from the previous
grace period against the current grace period.
Paul E. McKenney
2011-12-16