Commit 7f5d42d0 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Trace expedited GP delays due to transitioning CPUs

If a CPU is transitioning to or from offline state, an expedited
grace period may undergo a timed wait.  This timed wait can unduly
delay grace periods, so this commit adds a trace statement to make
it visible.
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 9a414201
...@@ -181,6 +181,7 @@ TRACE_EVENT(rcu_grace_period_init, ...@@ -181,6 +181,7 @@ TRACE_EVENT(rcu_grace_period_init,
* "start": Started a real expedited grace period. * "start": Started a real expedited grace period.
* "reset": Started resetting the tree * "reset": Started resetting the tree
* "select": Started selecting the CPUs to wait on. * "select": Started selecting the CPUs to wait on.
* "selectofl": Selected CPU partially offline.
* "startwait": Started waiting on selected CPUs. * "startwait": Started waiting on selected CPUs.
* "end": Ended a real expedited grace period. * "end": Ended a real expedited grace period.
* "endwake": Woke piggybackers up. * "endwake": Woke piggybackers up.
......
...@@ -32,7 +32,7 @@ static void rcu_exp_gp_seq_start(struct rcu_state *rsp) ...@@ -32,7 +32,7 @@ static void rcu_exp_gp_seq_start(struct rcu_state *rsp)
* Return then value that expedited-grace-period counter will have * Return then value that expedited-grace-period counter will have
* at the end of the current grace period. * at the end of the current grace period.
*/ */
static unsigned long rcu_exp_gp_seq_endval(struct rcu_state *rsp) static __maybe_unused unsigned long rcu_exp_gp_seq_endval(struct rcu_state *rsp)
{ {
return rcu_seq_endval(&rsp->expedited_sequence); return rcu_seq_endval(&rsp->expedited_sequence);
} }
...@@ -428,6 +428,7 @@ static void sync_rcu_exp_select_cpus(struct rcu_state *rsp, ...@@ -428,6 +428,7 @@ static void sync_rcu_exp_select_cpus(struct rcu_state *rsp,
(rnp->expmask & mask)) { (rnp->expmask & mask)) {
/* Online, so delay for a bit and try again. */ /* Online, so delay for a bit and try again. */
raw_spin_unlock_irqrestore_rcu_node(rnp, flags); raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
trace_rcu_exp_grace_period(rsp->name, rcu_exp_gp_seq_endval(rsp), TPS("selectofl"));
schedule_timeout_uninterruptible(1); schedule_timeout_uninterruptible(1);
goto retry_ipi; goto retry_ipi;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment