mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com,
	bobby.prani@gmail.com,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 08/24] rcutorture: Print measure of batching efficiency
Date: Tue, 12 Apr 2016 08:43:41 -0700	[thread overview]
Message-ID: <1460475837-26498-8-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160412154332.GA24983@linux.vnet.ibm.com>

This commit adds a line giving the number of grace periods, the number
of batches, and the ratio.  The larger the ratio, the greater the
batching efficiency.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 .../rcutorture/bin/kvm-recheck-rcuperf.sh          | 26 +++++++++++++---------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
index e5b28174fda0..1f72df8eedc7 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
@@ -34,33 +34,38 @@ fi
 
 configfile=`echo $i | sed -e 's/^.*\///'`
 
-grep -e '-perf:.*writer-duration' $i/console.log | sed -e 's/^\[[^]]*]//' |
+sed -e 's/^\[[^]]*]//' < $i/console.log |
 awk '
-{
+/-perf: .* gps: .* batches:/ {
+	ngps = $9;
+	nbatches = $11;
+}
+
+/-perf: .*writer-duration/ {
 	gptimes[++n] = $5 / 1000.;
 	sum += $5 / 1000.;
 }
 
 END {
-	if (NR <= 0) {
+	newNR = asort(gptimes);
+	if (newNR <= 0) {
 		print "No rcuperf records found???"
 		exit;
 	}
-	asort(gptimes);
-	pct50 = int(NR * 50 / 100);
+	pct50 = int(newNR * 50 / 100);
 	if (pct50 < 1)
 		pct50 = 1;
-	pct90 = int(NR * 90 / 100);
+	pct90 = int(newNR * 90 / 100);
 	if (pct90 < 1)
 		pct90 = 1;
-	pct99 = int(NR * 99 / 100);
+	pct99 = int(newNR * 99 / 100);
 	if (pct99 < 1)
 		pct99 = 1;
 	div = 10 ** int(log(gptimes[pct90]) / log(10) + .5) / 100;
 	print "Histogram bucket size: " div;
 	last = gptimes[1] - 10;
 	count = 0;
-	for (i = 1; i <= NR; i++) {
+	for (i = 1; i <= newNR; i++) {
 		current = div * int(gptimes[i] / div);
 		if (last == current) {
 			count++;
@@ -73,10 +78,11 @@ END {
 	}
 	if (count > 0)
 		print last, count;
-	print "Average grace-period duration: " sum / NR " microseconds";
+	print "Average grace-period duration: " sum / newNR " microseconds";
 	print "Minimum grace-period duration: " gptimes[1];
 	print "50th percentile grace-period duration: " gptimes[pct50];
 	print "90th percentile grace-period duration: " gptimes[pct90];
 	print "99th percentile grace-period duration: " gptimes[pct99];
-	print "Maximum grace-period duration: " gptimes[NR];
+	print "Maximum grace-period duration: " gptimes[newNR];
+	print "Grace periods: " ngps + 0 " Batches: " nbatches + 0 " Ratio: " ngps / nbatches;
 }'
-- 
2.5.2

  parent reply	other threads:[~2016-04-12 15:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 15:43 [PATCH tip/core/rcu 0/24] Torture-test changes for 4.7 Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 01/24] rcutorture: Update scripting to accommodate rcuperf Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 02/24] rcutorture: Allow for rcupdate.rcu_normal Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 03/24] rcutorture: Expedited-GP batch progress access to torturing Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 04/24] rcutorture: Add RCU grace-period performance tests Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 05/24] rcutorture: Documentation for rcuperf kernel parameters Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 06/24] rcutorture: Bind rcuperf reader/writer kthreads to CPUs Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 07/24] rcutorture: Set rcuperf writer kthreads to real-time priority Paul E. McKenney
2016-04-12 15:43 ` Paul E. McKenney [this message]
2016-04-12 15:43 ` [PATCH tip/core/rcu 09/24] rcutorture: Make rcuperf collect expedited event-trace data Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 10/24] rcutorture: Make scripts analyze rcuperf trace data, if present Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 11/24] rcutorture: Add rcuperf holdoff boot parameter to reduce interference Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 12/24] rcutorture: Avoid RCU CPU stall warning and RT throttling Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 13/24] rcutorture: Add largish-system rcuperf scenario Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 14/24] rcuperf: Do not wake up shutdown wait queue if "shutdown" is false Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 15/24] rcutorture: Remove redundant initialization to zero Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 16/24] rcutorture: Consider FROZEN hotplug notifier transitions Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 17/24] torture: Clarify refusal to run more than one torture test Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 18/24] torture: Kill qemu, not parent process Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 19/24] rcutorture: Convert test duration to seconds early Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 20/24] rcutorture: Add OS-jitter capability Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 21/24] rcutorture: Don't rebuild identical kernel Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 22/24] rcutorture: Dump trace buffer upon shutdown Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 23/24] rcutorture: Add irqs-disabled test for call_rcu() Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 24/24] rcutorture: Add boot-time adjustment of leaf fanout Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460475837-26498-8-git-send-email-paulmck@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhart@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®