diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-05-15 18:47:30 -0400 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-07-12 18:39:09 -0400 |
| commit | fea3f222d3523dfdd0e86b11227d3cda20765102 (patch) | |
| tree | 2e1e57bff5faf04adc89496064f491e834b9601f /kernel/rcu/tree.c | |
| parent | 577389423187d8b51dfe6199297e579a3419b72b (diff) | |
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>
Diffstat (limited to 'kernel/rcu/tree.c')
| -rw-r--r-- | kernel/rcu/tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index a2503ef1bbe2..ee218d743226 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -1891,6 +1891,7 @@ static bool rcu_gp_init(struct rcu_state *rsp) | |||
| 1891 | * for subsequent online CPUs, and that quiescent-state forcing | 1891 | * for subsequent online CPUs, and that quiescent-state forcing |
| 1892 | * will handle subsequent offline CPUs. | 1892 | * will handle subsequent offline CPUs. |
| 1893 | */ | 1893 | */ |
| 1894 | rsp->gp_state = RCU_GP_ONOFF; | ||
| 1894 | rcu_for_each_leaf_node(rsp, rnp) { | 1895 | rcu_for_each_leaf_node(rsp, rnp) { |
| 1895 | spin_lock(&rsp->ofl_lock); | 1896 | spin_lock(&rsp->ofl_lock); |
| 1896 | raw_spin_lock_irq_rcu_node(rnp); | 1897 | raw_spin_lock_irq_rcu_node(rnp); |
| @@ -1950,6 +1951,7 @@ static bool rcu_gp_init(struct rcu_state *rsp) | |||
| 1950 | * The grace period cannot complete until the initialization | 1951 | * The grace period cannot complete until the initialization |
| 1951 | * process finishes, because this kthread handles both. | 1952 | * process finishes, because this kthread handles both. |
| 1952 | */ | 1953 | */ |
| 1954 | rsp->gp_state = RCU_GP_INIT; | ||
| 1953 | rcu_for_each_node_breadth_first(rsp, rnp) { | 1955 | rcu_for_each_node_breadth_first(rsp, rnp) { |
| 1954 | rcu_gp_slow(rsp, gp_init_delay); | 1956 | rcu_gp_slow(rsp, gp_init_delay); |
| 1955 | raw_spin_lock_irqsave_rcu_node(rnp, flags); | 1957 | raw_spin_lock_irqsave_rcu_node(rnp, flags); |
