From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
mingo@kernel.org, jiangshanlai@gmail.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,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 07/28] rcuscale: Add RCU Tasks Trace
Date: Thu, 5 Nov 2020 15:46:58 -0800 [thread overview]
Message-ID: <20201105234719.23307-7-paulmck@kernel.org> (raw)
In-Reply-To: <20201105234658.GA23142@paulmck-ThinkPad-P72>
From: "Paul E. McKenney" <paulmck@kernel.org>
This commit adds the ability to test performance and scalability of RCU
Tasks Trace updaters.
Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
kernel/rcu/rcuscale.c | 32 +++++++++++++++++++++-
.../selftests/rcutorture/configs/rcuscale/CFcommon | 3 ++
.../selftests/rcutorture/configs/rcuscale/TRACE01 | 15 ++++++++++
.../rcutorture/configs/rcuscale/TRACE01.boot | 1 +
4 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01
create mode 100644 tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01.boot
diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
index 2819b95..c42f240 100644
--- a/kernel/rcu/rcuscale.c
+++ b/kernel/rcu/rcuscale.c
@@ -38,6 +38,7 @@
#include <asm/byteorder.h>
#include <linux/torture.h>
#include <linux/vmalloc.h>
+#include <linux/rcupdate_trace.h>
#include "rcu.h"
@@ -294,6 +295,35 @@ static struct rcu_scale_ops tasks_ops = {
.name = "tasks"
};
+/*
+ * Definitions for RCU-tasks-trace scalability testing.
+ */
+
+static int tasks_trace_scale_read_lock(void)
+{
+ rcu_read_lock_trace();
+ return 0;
+}
+
+static void tasks_trace_scale_read_unlock(int idx)
+{
+ rcu_read_unlock_trace();
+}
+
+static struct rcu_scale_ops tasks_tracing_ops = {
+ .ptype = RCU_TASKS_FLAVOR,
+ .init = rcu_sync_scale_init,
+ .readlock = tasks_trace_scale_read_lock,
+ .readunlock = tasks_trace_scale_read_unlock,
+ .get_gp_seq = rcu_no_completed,
+ .gp_diff = rcu_seq_diff,
+ .async = call_rcu_tasks_trace,
+ .gp_barrier = rcu_barrier_tasks_trace,
+ .sync = synchronize_rcu_tasks_trace,
+ .exp_sync = synchronize_rcu_tasks_trace,
+ .name = "tasks-tracing"
+};
+
static unsigned long rcuscale_seq_diff(unsigned long new, unsigned long old)
{
if (!cur_ops->gp_diff)
@@ -754,7 +784,7 @@ rcu_scale_init(void)
long i;
int firsterr = 0;
static struct rcu_scale_ops *scale_ops[] = {
- &rcu_ops, &srcu_ops, &srcud_ops, &tasks_ops,
+ &rcu_ops, &srcu_ops, &srcud_ops, &tasks_ops, &tasks_tracing_ops
};
if (!torture_init_begin(scale_type, verbose))
diff --git a/tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon b/tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon
index 87caa0e..90942bb 100644
--- a/tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon
+++ b/tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon
@@ -1,2 +1,5 @@
CONFIG_RCU_SCALE_TEST=y
CONFIG_PRINTK_TIME=y
+CONFIG_TASKS_RCU_GENERIC=y
+CONFIG_TASKS_RCU=y
+CONFIG_TASKS_TRACE_RCU=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01 b/tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01
new file mode 100644
index 0000000..e6baa2f
--- /dev/null
+++ b/tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01
@@ -0,0 +1,15 @@
+CONFIG_SMP=y
+CONFIG_PREEMPT_NONE=y
+CONFIG_PREEMPT_VOLUNTARY=n
+CONFIG_PREEMPT=n
+CONFIG_HZ_PERIODIC=n
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NO_HZ_FULL=n
+CONFIG_RCU_FAST_NO_HZ=n
+CONFIG_RCU_NOCB_CPU=n
+CONFIG_DEBUG_LOCK_ALLOC=n
+CONFIG_PROVE_LOCKING=n
+CONFIG_RCU_BOOST=n
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
+CONFIG_RCU_TRACE=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01.boot b/tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01.boot
new file mode 100644
index 0000000..af0aff1
--- /dev/null
+++ b/tools/testing/selftests/rcutorture/configs/rcuscale/TRACE01.boot
@@ -0,0 +1 @@
+rcuscale.scale_type=tasks-tracing
--
2.9.5
next prev parent reply other threads:[~2020-11-05 23:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 23:46 [PATCH tip/core/rcu 0/28] Torture-test updates for v5.11 Paul E. McKenney
2020-11-05 23:46 ` [PATCH tip/core/rcu 01/28] refscale: Bounds-check module parameters paulmck
2020-11-05 23:46 ` [PATCH tip/core/rcu 02/28] torture: Don't kill gdb sessions paulmck
2020-11-05 23:46 ` [PATCH tip/core/rcu 03/28] locktorture: Track time of last ->writeunlock() paulmck
2020-11-06 6:56 ` Davidlohr Bueso
2020-11-06 19:13 ` Paul E. McKenney
2020-11-05 23:46 ` [PATCH tip/core/rcu 04/28] torture: Periodically pause in stutter_wait() paulmck
2020-11-05 23:46 ` [PATCH tip/core/rcu 05/28] torture: Make torture_stutter() use hrtimer paulmck
2020-11-05 23:46 ` [PATCH tip/core/rcu 06/28] scftorture: Add an alternative IPI vector paulmck
2020-11-05 23:46 ` paulmck [this message]
2020-11-05 23:46 ` [PATCH tip/core/rcu 08/28] rcuscale: Avoid divide by zero paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 09/28] torture: Exclude "NOHZ tick-stop error" from fatal errors paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 10/28] rcuscale: Prevent hangs for invalid arguments paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 11/28] refscale: " paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 12/28] rcutorture: Adjust scenarios SRCU-t and SRCU-u to make kconfig happy paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 13/28] locktorture: Ignore nreaders_stress if no readlock support paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 14/28] locktorture: Prevent hangs for invalid arguments paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 15/28] torture: Prevent jitter processes from delaying failed run paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 16/28] rcutorture: Prevent hangs for invalid arguments paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 17/28] torture: Force weak-hashed pointers on console log paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 18/28] rcutorture: Make stutter_wait() caller restore priority paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 19/28] torture: Accept time units on kvm.sh --duration argument paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 20/28] rcutorture: Small code cleanups paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 21/28] torture: Allow alternative forms of kvm.sh command-line arguments paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 22/28] scftorture: Add full-test stutter capability paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 23/28] locktorture: Invoke percpu_free_rwsem() to do percpu-rwsem cleanup paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 24/28] rcutorture: Don't do need_resched() testing if ->sync is NULL paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 25/28] rcutorture/nolibc: Fix a typo in header file paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 26/28] torture: Make kvm-check-branches.sh use --allcpus paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 27/28] tools/nolibc: Fix a spelling error in a comment paulmck
2020-11-05 23:47 ` [PATCH tip/core/rcu 28/28] tools/rcutorture: Fix BUG parsing of console.log paulmck
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=20201105234719.23307-7-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).