From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
rostedt@goodmis.org, Joel Fernandes <jfern@kernel.org>,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH 2/6] rcutorture: Make torture.sh test NMIs for atomic SRCU on x86
Date: Mon, 16 Nov 2026 09:26:26 -0800 [thread overview]
Message-ID: <20261116172630.3845508-2-paulmck@kernel.org> (raw)
In-Reply-To: <bf761cab-7423-464b-ba8e-bd39ad0eb089@paulmck-laptop>
This commit adds '--qemu-args "-cpu host,pmu=on"' and kernel boot
arguments "rcutorture.nmi_readers=1 rcutorture.nmi_calls=1" for
--do-atomic-srcu runs of torture.sh. This ensures regular testing of
atomic SRCU readers from NMI handlers, at least when running on x86
systems providing PMU support.
[ paulmck: Apply Mathieu Desnoyers feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
tools/testing/selftests/rcutorture/bin/torture.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index ce6b7e9589fe5..cd023272137a0 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -523,21 +523,24 @@ fi
# does not support.
if test "$do_atomic_srcu" = "yes"
then
- torture_bootargs="rcutorture.reader_flavor=0x10"
+ torture_bootargs="rcutorture.reader_flavor=0x10 rcutorture.atomic_irqsave=1 rcutorture.nmi_readers=1"
configs_atomic_srcu="SRCU-N SRCU-P"
if test "$ifnotaarch64" = yes
then
configs_atomic_srcu="$configs_atomic_srcu SRCU-T"
+ qemu_args="-cpu host,pmu=on"
+ else
+ qemu_args=
fi
torture_set "atomic-srcu" tools/testing/selftests/rcutorture/bin/kvm.sh \
--allcpus --duration "$duration_rcutorture" \
- --configs "$configs_atomic_srcu" --trust-make
+ --configs "$configs_atomic_srcu" ${qemu_args:+--qemu-args "$qemu_args"} --trust-make
# Half the readers then use srcu_read_lock_atomic_irqsave().
- torture_bootargs="rcutorture.reader_flavor=0x10 rcutorture.atomic_irqsave=1"
+ torture_bootargs="rcutorture.reader_flavor=0x10 rcutorture.atomic_irqsave=1 rcutorture.nmi_readers=1"
torture_set "atomic-srcu-irqsave" tools/testing/selftests/rcutorture/bin/kvm.sh \
--allcpus --duration "$duration_rcutorture" \
- --configs "SRCU-P" --trust-make
+ --configs "SRCU-P" ${qemu_args:+--qemu-args "$qemu_args"} --trust-make
fi
if test "$do_locktorture" = "yes"
--
2.40.1
next prev parent reply other threads:[~2026-11-16 17:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 17:25 [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Paul E. McKenney
2026-11-16 17:26 ` [PATCH 1/6] MAINTAINERS: Add Puranjay Mohan and RCU reviewer Paul E. McKenney
2026-11-17 9:12 ` Frederic Weisbecker
2026-11-16 17:26 ` Paul E. McKenney [this message]
2026-11-16 17:26 ` [PATCH 3/6] torture: Avoid duplicate identify_qemu_vcpus calls in torture.sh Paul E. McKenney
2026-11-16 17:26 ` [PATCH 4/6] rcutorture: Make torture.sh test NMIs for RCU on x86 Paul E. McKenney
2026-11-16 17:26 ` [PATCH 5/6] torture: Make kvm.sh ignore empty-string arguments Paul E. McKenney
2026-11-16 17:26 ` [PATCH 6/6] torture: Use ${:+} to save a few lines in torture.sh's torture_one() Paul E. McKenney
2026-11-16 19:00 ` [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Joel Fernandes
2026-11-16 19:48 ` Paul E. McKenney
2026-11-16 19:50 ` Joel Fernandes
2026-11-16 20:05 ` Paul E. McKenney
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=20261116172630.3845508-2-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=jfern@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.