rcu: Record ->gp_state for both phases of grace-period initialization
Grace-period initialization first processes any recent CPU-hotplug operations, and then initializes state for the new grace period. These two phases of initialization are currently not distinguished in debug prints, but the distinction is valuable in a number of debug situations. This commit therefore introduces two new values for ->gp_state, RCU_GP_ONOFF and RCU_GP_INIT, in order to make this distinction. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
@@ -1891,6 +1891,7 @@ static bool rcu_gp_init(struct rcu_state *rsp)
|
||||
* for subsequent online CPUs, and that quiescent-state forcing
|
||||
* will handle subsequent offline CPUs.
|
||||
*/
|
||||
rsp->gp_state = RCU_GP_ONOFF;
|
||||
rcu_for_each_leaf_node(rsp, rnp) {
|
||||
spin_lock(&rsp->ofl_lock);
|
||||
raw_spin_lock_irq_rcu_node(rnp);
|
||||
@@ -1950,6 +1951,7 @@ static bool rcu_gp_init(struct rcu_state *rsp)
|
||||
* The grace period cannot complete until the initialization
|
||||
* process finishes, because this kthread handles both.
|
||||
*/
|
||||
rsp->gp_state = RCU_GP_INIT;
|
||||
rcu_for_each_node_breadth_first(rsp, rnp) {
|
||||
rcu_gp_slow(rsp, gp_init_delay);
|
||||
raw_spin_lock_irqsave_rcu_node(rnp, flags);
|
||||
|
Reference in New Issue
Block a user