Messages in this thread Patch in this message | | | Date | Wed, 9 Mar 2011 17:17:14 -0500 | From | Joe Korty <> | Subject | [PATCH 4/4] jrcu: add new stat to /sys/kernel/debug/rcu/rcudata |
| |
jrcu: display #passes in /sys/kernel/debug/rcu/rcudata.
Sometimes, when things are not working right, you cannot tell if that is because the daemon is not running at all, or because it is running, but on every pass it decides to do no work. With this change those two states can now be distinguished.
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Index: b/kernel/jrcu.c =================================================================== --- a/kernel/jrcu.c +++ b/kernel/jrcu.c @@ -115,6 +115,7 @@ static struct rcu_data rcu_data[NR_CPUS] /* debug & statistics stuff */ static struct rcu_stats { + unsigned npasses; /* #passes made */ unsigned nbatches; /* #end-of-batches (eobs) seen */ atomic_t nbarriers; /* #rcu barriers processed */ u64 ninvoked; /* #invoked (ie, finished) callbacks */ @@ -362,6 +363,7 @@ static void rcu_delimit_batches(void) struct rcu_list pending; rcu_list_init(&pending); + rcu_stats.npasses++; raw_local_irq_save(flags); smp_rmb(); @@ -529,6 +531,8 @@ static int rcu_debugfs_show(struct seq_f msecs = div_s64(sched_clock() - rcu_timestamp, NSEC_PER_MSEC); raw_local_irq_enable(); + seq_printf(m, "%14u: #passes seen\n", + rcu_stats.npasses); seq_printf(m, "%14u: #batches seen\n", rcu_stats.nbatches); seq_printf(m, "%14u: #barriers seen\n",
| |