Skip to content

Commit 1d702e2

Browse files
committed
rcuscale: Print grace-period kthread CPU time, if recorded
This commit prints out the CPU time consumed by the grace-period kthread, if the specified RCU flavor supports this notion. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 2d7b2b3 commit 1d702e2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuscale.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ awk '
4040
sum += $5 / 1000.;
4141
}
4242
43+
/rcu_scale: Grace-period kthread CPU time/ {
44+
cputime = $6;
45+
}
46+
4347
END {
4448
newNR = asort(gptimes);
4549
if (newNR <= 0) {
@@ -78,6 +82,8 @@ END {
7882
print "90th percentile grace-period duration: " gptimes[pct90];
7983
print "99th percentile grace-period duration: " gptimes[pct99];
8084
print "Maximum grace-period duration: " gptimes[newNR];
81-
print "Grace periods: " ngps + 0 " Batches: " nbatches + 0 " Ratio: " ngps / nbatches;
85+
if (cputime != "")
86+
cpustr = " CPU: " cputime;
87+
print "Grace periods: " ngps + 0 " Batches: " nbatches + 0 " Ratio: " ngps / nbatches cpustr;
8288
print "Computed from rcuscale printk output.";
8389
}'

0 commit comments

Comments
 (0)