diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-01-13 13:52:35 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-03-31 16:34:03 -0400 |
commit | 251c617c75f48e03523c43c4ce1dff44bc3ae2bd (patch) | |
tree | 62be528b88376633dbb9c6d85aacf59948678aa5 /kernel/rcu/tree.c | |
parent | 28728dd310d48834cd486dac3cac9ae96b9deb96 (diff) |
rcu: Make expedited RCU-preempt stall warnings count accurately
Currently, synchronize_sched_expedited_wait() simply sets the ndetected
variable to the rcu_print_task_exp_stall() return value. This means
that if the last rcu_node structure has no stalled tasks, record of
any stalled tasks in previous rcu_node structures is lost, which can
in turn result in failure to dump out the blocking rcu_node structures.
Or could, had the test been correct.
This commit therefore adds the return value of rcu_print_task_exp_stall()
to ndetected and corrects the later test for ndetected.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 5f4336fadc28..687d8a5f35c7 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -3778,7 +3778,7 @@ static void synchronize_sched_expedited_wait(struct rcu_state *rsp) | |||
3778 | rsp->name); | 3778 | rsp->name); |
3779 | ndetected = 0; | 3779 | ndetected = 0; |
3780 | rcu_for_each_leaf_node(rsp, rnp) { | 3780 | rcu_for_each_leaf_node(rsp, rnp) { |
3781 | ndetected = rcu_print_task_exp_stall(rnp); | 3781 | ndetected += rcu_print_task_exp_stall(rnp); |
3782 | mask = 1; | 3782 | mask = 1; |
3783 | for (cpu = rnp->grplo; cpu <= rnp->grphi; cpu++, mask <<= 1) { | 3783 | for (cpu = rnp->grplo; cpu <= rnp->grphi; cpu++, mask <<= 1) { |
3784 | struct rcu_data *rdp; | 3784 | struct rcu_data *rdp; |
@@ -3797,7 +3797,7 @@ static void synchronize_sched_expedited_wait(struct rcu_state *rsp) | |||
3797 | pr_cont(" } %lu jiffies s: %lu root: %#lx/%c\n", | 3797 | pr_cont(" } %lu jiffies s: %lu root: %#lx/%c\n", |
3798 | jiffies - jiffies_start, rsp->expedited_sequence, | 3798 | jiffies - jiffies_start, rsp->expedited_sequence, |
3799 | rnp_root->expmask, ".T"[!!rnp_root->exp_tasks]); | 3799 | rnp_root->expmask, ".T"[!!rnp_root->exp_tasks]); |
3800 | if (!ndetected) { | 3800 | if (ndetected) { |
3801 | pr_err("blocking rcu_node structures:"); | 3801 | pr_err("blocking rcu_node structures:"); |
3802 | rcu_for_each_node_breadth_first(rsp, rnp) { | 3802 | rcu_for_each_node_breadth_first(rsp, rnp) { |
3803 | if (rnp == rnp_root) | 3803 | if (rnp == rnp_root) |