lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460475837-26498-8-git-send-email-paulmck@linux.vnet.ibm.com>
Date:	Tue, 12 Apr 2016 08:43:41 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	linux-kernel@...r.kernel.org
Cc:	mingo@...nel.org, jiangshanlai@...il.com, dipankar@...ibm.com,
	akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
	josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
	dvhart@...ux.intel.com, fweisbec@...il.com, oleg@...hat.com,
	bobby.prani@...il.com,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 08/24] rcutorture: Print measure of batching efficiency

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@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ