diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-05-02 01:49:48 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-06-29 20:58:49 +0200 |
commit | e816d56fad57ba9817cef6606b12f5e14647c3bf (patch) | |
tree | 246c1262e13082eb2356f31fc092cdf06a6f84c8 /kernel/rcu/tree_stall.h | |
parent | rcu: Simplify the calculation of rcu_state.ncpus (diff) | |
download | linux-e816d56fad57ba9817cef6606b12f5e14647c3bf.tar.xz linux-e816d56fad57ba9817cef6606b12f5e14647c3bf.zip |
rcu: Add callbacks-invoked counters
This commit adds a count of the callbacks invoked to the per-CPU rcu_data
structure. This count is printed by the show_rcu_gp_kthreads() that
is invoked by rcutorture and the RCU CPU stall-warning code. It is also
intended for use by drgn.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree_stall.h')
-rw-r--r-- | kernel/rcu/tree_stall.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 54a6dba0280d..2768ce6bf657 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -649,6 +649,7 @@ static void check_cpu_stall(struct rcu_data *rdp) */ void show_rcu_gp_kthreads(void) { + unsigned long cbs = 0; int cpu; unsigned long j; unsigned long ja; @@ -690,9 +691,11 @@ void show_rcu_gp_kthreads(void) } for_each_possible_cpu(cpu) { rdp = per_cpu_ptr(&rcu_data, cpu); + cbs += data_race(rdp->n_cbs_invoked); if (rcu_segcblist_is_offloaded(&rdp->cblist)) show_rcu_nocb_state(rdp); } + pr_info("RCU callbacks invoked since boot: %lu\n", cbs); show_rcu_tasks_gp_kthreads(); } EXPORT_SYMBOL_GPL(show_rcu_gp_kthreads); |