mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 17/24] jrcu: track #passes since last end-of-batch
@ 2011-03-24 17:48 Joe Korty
  0 siblings, 0 replies; only message in thread
From: Joe Korty @ 2011-03-24 17:48 UTC (permalink / raw)
  To: paulmck
  Cc: fweisbec, peterz, laijs, mathieu.desnoyers, dhowells,
	loic.minier, dhaval.giani, tglx, josh, houston.jim, andi,
	linux-kernel

jrcu: track how many passes have gone by since last end-of-batch.

Signed-off-by: Joe Korty <joe.korty@ccur.com>

Index: b/kernel/jrcu.c
===================================================================
--- a/kernel/jrcu.c
+++ b/kernel/jrcu.c
@@ -120,6 +120,7 @@ static struct rcu_data rcu_data[NR_CPUS]
 /* debug & statistics stuff */
 static struct rcu_stats {
 	unsigned npasses;	/* #passes made */
+	unsigned nlast;		/* #passes since last end-of-batch */
 	unsigned nbatches;	/* #end-of-batches (eobs) seen */
 	atomic_t nbarriers;	/* #rcu barriers processed */
 	atomic_t nsyncs;	/* #rcu syncs processed */
@@ -329,6 +330,8 @@ static void __rcu_delimit_batches(struct
 	 * gone by.
 	 */
 	rcu_now = sched_clock();
+	rcu_stats.nlast++;
+
 	if (!eob && !rcu_timestamp
 	&& ((rcu_now - rcu_timestamp) > (s64)rcu_wdog * NSEC_PER_SEC)) {
 		rcu_stats.nforced++;
@@ -389,6 +392,7 @@ static void __rcu_delimit_batches(struct
 	 */
 	xchg(&rcu_which, prev); /* only place where rcu_which is written to */
 	rcu_stats.nbatches++;
+	rcu_stats.nlast = 0;
 }
 
 static void rcu_delimit_batches(void)
@@ -598,6 +602,8 @@ static int rcu_debugfs_show(struct seq_f
 		rcu_stats.nbatches);
 	seq_printf(m, "%14u: #passes not resulting in end-of-batch\n",
 		rcu_stats.npasses - rcu_stats.nbatches);
+	seq_printf(m, "%14u: #passes since last end-of-batch\n",
+		rcu_stats.nlast);
 	seq_printf(m, "%14u: #msecs since last end-of-batch\n",
 		msecs);
 	seq_printf(m, "%14u: #passes forced (0 is best)\n",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-24 17:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-24 17:48 [PATCH 17/24] jrcu: track #passes since last end-of-batch Joe Korty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome