diff options
author | Paul E. McKenney <paulmck@linux.ibm.com> | 2018-10-03 02:09:56 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2018-12-01 21:45:38 +0100 |
commit | bfcfcffc5f23e76a1b88f7412ee7efaec5107b28 (patch) | |
tree | 3945bad0d3b2bc85cf31f08aae6e3a53949a7efd /kernel/rcu | |
parent | rcu: Account for nocb-CPU callback counts in RCU CPU stall warnings (diff) | |
download | linux-bfcfcffc5f23e76a1b88f7412ee7efaec5107b28.tar.xz linux-bfcfcffc5f23e76a1b88f7412ee7efaec5107b28.zip |
rcu: Print per-CPU callback counts for forward-progress failures
This commit prints out the non-zero per-CPU callback counts when a
forware-progress error (OOM event) occurs.
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
[ paulmck: Fix a pair of uninitialized locals spotted by kbuild test robot. ]
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 0933d8650890..90a67c75a447 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2675,6 +2675,10 @@ rcu_check_gp_start_stall(struct rcu_node *rnp, struct rcu_data *rdp, */ void rcu_fwd_progress_check(unsigned long j) { + unsigned long cbs; + int cpu; + unsigned long max_cbs = 0; + int max_cpu = -1; struct rcu_data *rdp; if (rcu_gp_in_progress()) { @@ -2685,6 +2689,20 @@ void rcu_fwd_progress_check(unsigned long j) rcu_check_gp_start_stall(rdp->mynode, rdp, j); preempt_enable(); } + for_each_possible_cpu(cpu) { + cbs = rcu_get_n_cbs_cpu(cpu); + if (!cbs) + continue; + if (max_cpu < 0) + pr_info("%s: callbacks", __func__); + pr_cont(" %d: %lu", cpu, cbs); + if (cbs <= max_cbs) + continue; + max_cbs = cbs; + max_cpu = cpu; + } + if (max_cpu >= 0) + pr_cont("\n"); } EXPORT_SYMBOL_GPL(rcu_fwd_progress_check); |