mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 16/24] jrcu: separate barrier and sync stats
@ 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: seperate barrier/sync stats.

Now that barriers are distinct from syncs, give
each their own stats.

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

Index: b/kernel/jrcu.c
===================================================================
--- a/kernel/jrcu.c
+++ b/kernel/jrcu.c
@@ -122,6 +122,7 @@ static struct rcu_stats {
 	unsigned npasses;	/* #passes made */
 	unsigned nbatches;	/* #end-of-batches (eobs) seen */
 	atomic_t nbarriers;	/* #rcu barriers processed */
+	atomic_t nsyncs;	/* #rcu syncs processed */
 	u64 ninvoked;		/* #invoked (ie, finished) callbacks */
 	atomic_t nleft;		/* #callbacks left (ie, not yet invoked) */
 	unsigned nforced;	/* #forced eobs (should be zero) */
@@ -215,7 +216,7 @@ void synchronize_sched(void)
 	init_completion(&rcu.completion);
 	call_rcu(&rcu.head, wakeme_after_rcu);
 	wait_for_completion(&rcu.completion);
-	atomic_inc(&rcu_stats.nbarriers);
+	atomic_inc(&rcu_stats.nsyncs);
 
 }
 EXPORT_SYMBOL_GPL(synchronize_sched);
@@ -224,6 +225,7 @@ void rcu_barrier(void)
 {
 	synchronize_sched();
 	synchronize_sched();
+	atomic_inc(&rcu_stats.nbarriers);
 }
 EXPORT_SYMBOL_GPL(rcu_barrier);
 
@@ -604,6 +606,8 @@ static int rcu_debugfs_show(struct seq_f
 	seq_printf(m, "\n");
 	seq_printf(m, "%14u: #barriers\n",
 		atomic_read(&rcu_stats.nbarriers));
+	seq_printf(m, "%14u: #syncs\n",
+		atomic_read(&rcu_stats.nsyncs));
 	seq_printf(m, "%14llu: #callbacks invoked\n",
 		rcu_stats.ninvoked);
 	seq_printf(m, "%14u: #callbacks left to invoke\n",

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

only message in thread, other threads:[~2011-03-24 17:49 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 16/24] jrcu: separate barrier and sync stats 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