[<prev] [next>] [day] [month] [year] [list]
Message-ID: <159618737390.4006.3908578018562144708.tip-bot2@tip-bot2>
Date: Fri, 31 Jul 2020 09:22:53 -0000
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Paul E. McKenney" <paulmck@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: core/rcu] refperf: Add test for RCU Tasks readers
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: e13ef442fe522fa1f604efec8c899a0e1fc3d426
Gitweb: https://git.kernel.org/tip/e13ef442fe522fa1f604efec8c899a0e1fc3d426
Author: Paul E. McKenney <paulmck@...nel.org>
AuthorDate: Wed, 03 Jun 2020 11:56:34 -07:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Mon, 29 Jun 2020 12:00:46 -07:00
refperf: Add test for RCU Tasks readers
This commit adds testing for RCU Tasks readers to the refperf module.
This also applies to RCU Rude readers, as both flavors have empty
(as in non-existent) read-side markers.
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
---
kernel/rcu/refperf.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/refperf.c b/kernel/rcu/refperf.c
index da7de9a..2bfdcdc 100644
--- a/kernel/rcu/refperf.c
+++ b/kernel/rcu/refperf.c
@@ -192,6 +192,31 @@ static struct ref_perf_ops srcu_ops = {
.name = "srcu"
};
+// Definitions for RCU Tasks ref perf testing: Empty read markers.
+// These definitions also work for RCU Rude readers.
+static void rcu_tasks_ref_perf_read_section(const int nloops)
+{
+ int i;
+
+ for (i = nloops; i >= 0; i--)
+ continue;
+}
+
+static void rcu_tasks_ref_perf_delay_section(const int nloops, const int udl, const int ndl)
+{
+ int i;
+
+ for (i = nloops; i >= 0; i--)
+ un_delay(udl, ndl);
+}
+
+static struct ref_perf_ops rcu_tasks_ops = {
+ .init = rcu_sync_perf_init,
+ .readsection = rcu_tasks_ref_perf_read_section,
+ .delaysection = rcu_tasks_ref_perf_delay_section,
+ .name = "rcu-tasks"
+};
+
// Definitions for RCU Tasks Trace ref perf testing.
static void rcu_trace_ref_perf_read_section(const int nloops)
{
@@ -613,7 +638,8 @@ ref_perf_init(void)
long i;
int firsterr = 0;
static struct ref_perf_ops *perf_ops[] = {
- &rcu_ops, &srcu_ops, &rcu_trace_ops, &refcnt_ops, &rwlock_ops, &rwsem_ops,
+ &rcu_ops, &srcu_ops, &rcu_trace_ops, &rcu_tasks_ops,
+ &refcnt_ops, &rwlock_ops, &rwsem_ops,
};
if (!torture_init_begin(perf_type, verbose))
Powered by blists - more mailing lists