[<prev] [next>] [day] [month] [year] [list]
Message-ID: <159618738645.4006.7605038959064014144.tip-bot2@tip-bot2>
Date: Fri, 31 Jul 2020 09:23:06 -0000
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Joel Fernandes (Google)" <joel@...lfernandes.org>,
"Paul E. McKenney" <paulmck@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: core/rcu] refperf: Allow decimal nanoseconds
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: 83b88c86da0e5f97faeac5a9bb19fe32f8c0394b
Gitweb: https://git.kernel.org/tip/83b88c86da0e5f97faeac5a9bb19fe32f8c0394b
Author: Paul E. McKenney <paulmck@...nel.org>
AuthorDate: Mon, 25 May 2020 15:31:07 -07:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Mon, 29 Jun 2020 12:00:44 -07:00
refperf: Allow decimal nanoseconds
The CONFIG_PREEMPT=n rcu_read_lock()/rcu_read_unlock() pair's overhead,
even including loop overhead, is far less than one nanosecond.
Since logscale plots are not all that happy with zero values, provide
picoseconds as decimals.
Cc: Joel Fernandes (Google) <joel@...lfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
---
kernel/rcu/refperf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/refperf.c b/kernel/rcu/refperf.c
index 57c7b7a..e991d48 100644
--- a/kernel/rcu/refperf.c
+++ b/kernel/rcu/refperf.c
@@ -375,7 +375,7 @@ static int main_func(void *arg)
if (torture_must_stop())
goto end;
- reader_tasks[exp].result_avg = process_durations(exp) / ((exp + 1) * loops);
+ reader_tasks[exp].result_avg = 1000 * process_durations(exp) / ((exp + 1) * loops);
}
// Print the average of all experiments
@@ -386,7 +386,7 @@ static int main_func(void *arg)
strcat(buf, "Threads\tTime(ns)\n");
for (exp = 0; exp < nreaders; exp++) {
- sprintf(buf1, "%d\t%llu\n", exp + 1, reader_tasks[exp].result_avg);
+ sprintf(buf1, "%d\t%llu.%03d\n", exp + 1, reader_tasks[exp].result_avg / 1000, (int)(reader_tasks[exp].result_avg % 1000));
strcat(buf, buf1);
}
Powered by blists - more mailing lists