lkml.org 
[lkml]   [2011]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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",

\
 
 \ /
  Last update: 2011-03-09 23:19    [W:0.202 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site