mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6] Additional miscellaneous RCU updates for v7.5
@ 2026-11-16 17:25 Paul E. McKenney
  2026-11-16 17:26 ` [PATCH 1/6] MAINTAINERS: Add Puranjay Mohan and RCU reviewer Paul E. McKenney
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Paul E. McKenney @ 2026-11-16 17:25 UTC (permalink / raw)
  To: rcu; +Cc: linux-kernel, kernel-team, rostedt, Joel Fernandes

Hello!

This series provides additional miscellaneous updates for v7.5:

1.	MAINTAINERS: Add Puranjay Mohan and RCU reviewer.

2.	Make torture.sh test NMIs for atomic SRCU on x86.

3.	Avoid duplicate identify_qemu_vcpus calls in torture.sh.

4.	Make torture.sh test NMIs for RCU on x86.

5.	Make kvm.sh ignore empty-string arguments.

6.	Use ${:+} to save a few lines in torture.sh's torture_one().

						Thanx, Paul

------------------------------------------------------------------------

 b/MAINTAINERS                                       |    1 
 b/tools/testing/selftests/rcutorture/bin/kvm.sh     |    3 ++
 b/tools/testing/selftests/rcutorture/bin/torture.sh |   11 ++++++---
 tools/testing/selftests/rcutorture/bin/torture.sh   |   23 +++++++++-----------
 4 files changed, 22 insertions(+), 16 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] MAINTAINERS: Add Puranjay Mohan and RCU reviewer
  2026-11-16 17:25 [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Paul E. McKenney
@ 2026-11-16 17:26 ` Paul E. McKenney
  2026-11-16 17:26 ` [PATCH 2/6] rcutorture: Make torture.sh test NMIs for atomic SRCU on x86 Paul E. McKenney
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul E. McKenney @ 2026-11-16 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, rostedt, Joel Fernandes,
	Paul E. McKenney, Puranjay Mohan

Puranjay has made substantial contributions to RCU over the past year,
so it is time to add him as reviewer.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Puranjay Mohan <puranjay@kernel.org>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 93abbb315065d..6ebe13dce75dd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23485,6 +23485,7 @@ R:	Steven Rostedt <rostedt@goodmis.org>
 R:	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 R:	Lai Jiangshan <jiangshanlai@gmail.com>
 R:	Zqiang <qiang.zhang@linux.dev>
+R:	Puranjay Mohan <puranjay@kernel.org>
 L:	rcu@vger.kernel.org
 S:	Supported
 W:	http://www.rdrop.com/users/paulmck/RCU/
-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/6] rcutorture: Make torture.sh test NMIs for atomic SRCU on x86
  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-16 17:26 ` Paul E. McKenney
  2026-11-16 17:26 ` [PATCH 3/6] torture: Avoid duplicate identify_qemu_vcpus calls in torture.sh Paul E. McKenney
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul E. McKenney @ 2026-11-16 17:26 UTC (permalink / raw)
  To: rcu; +Cc: linux-kernel, kernel-team, rostedt, Joel Fernandes, Paul E. McKenney

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/6] torture: Avoid duplicate identify_qemu_vcpus calls in torture.sh
  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-16 17:26 ` [PATCH 2/6] rcutorture: Make torture.sh test NMIs for atomic SRCU on x86 Paul E. McKenney
@ 2026-11-16 17:26 ` Paul E. McKenney
  2026-11-16 17:26 ` [PATCH 4/6] rcutorture: Make torture.sh test NMIs for RCU on x86 Paul E. McKenney
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul E. McKenney @ 2026-11-16 17:26 UTC (permalink / raw)
  To: rcu; +Cc: linux-kernel, kernel-team, rostedt, Joel Fernandes, Paul E. McKenney

The torture.sh script assigns the return from the identify_qemu_vcpus()
bash function to TORTURE_ALLOTED_CPUS, but then invokes this same function
*again* to assign to compress_concurrency.  Save a call by copying the
value of TORTURE_ALLOTED_CPUS to compress_concurrency.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/torture.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index cd023272137a0..0be8bb08c5ca0 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -47,7 +47,7 @@ configs_hazptr=
 kcsan_kmake_args=
 
 # Default compression, duration, and apportionment.
-compress_concurrency="`identify_qemu_vcpus`"
+compress_concurrency="${TORTURE_ALLOTED_CPUS}"
 duration_base=10
 duration_rcutorture_frac=7
 duration_locktorture_frac=1
-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 4/6] rcutorture: Make torture.sh test NMIs for RCU on x86
  2026-11-16 17:25 [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Paul E. McKenney
                   ` (2 preceding siblings ...)
  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 ` Paul E. McKenney
  2026-11-16 17:26 ` [PATCH 5/6] torture: Make kvm.sh ignore empty-string arguments Paul E. McKenney
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul E. McKenney @ 2026-11-16 17:26 UTC (permalink / raw)
  To: rcu; +Cc: linux-kernel, kernel-team, rostedt, Joel Fernandes, Paul E. McKenney

This commit adds '--qemu-args "-cpu host,pmu=on"' and kernel boot
arguments "rcutorture.nmi_readers=1 rcutorture.nmi_calls=1" for
--do-rcutorture runs of torture.sh.  This ensures regular testing of
atomic RCU readers and call_rcu() updaters from NMI handlers, at least
when running on x86 systems providing PMU support.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/torture.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index 0be8bb08c5ca0..bc842c94c4379 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -513,8 +513,15 @@ fi
 # --torture rcu
 if test "$do_rcutorture" = "yes"
 then
-	torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000"
-	torture_set "rcutorture" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration "$duration_rcutorture" --configs "$configs_rcutorture" --trust-make
+	qemu_args=
+	if test "$ifnotaarch64" = yes
+	then
+		qemu_args="-cpu host,pmu=on"
+	fi
+	torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000 rcutorture.nmi_calls=1 rcutorture.nmi_readers=1"
+	torture_set "rcutorture" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus \
+		--duration "$duration_rcutorture" --configs "$configs_rcutorture" \
+		${qemu_args:+--qemu-args "$qemu_args"} --trust-make
 fi
 
 # Test atomic SRCU across Tree SRCU (SRCU-N and SRCU-P) and Tiny SRCU
-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 5/6] torture: Make kvm.sh ignore empty-string arguments
  2026-11-16 17:25 [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Paul E. McKenney
                   ` (3 preceding siblings ...)
  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 ` 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
  6 siblings, 0 replies; 8+ messages in thread
From: Paul E. McKenney @ 2026-11-16 17:26 UTC (permalink / raw)
  To: rcu; +Cc: linux-kernel, kernel-team, rostedt, Joel Fernandes, Paul E. McKenney

This commit makes kvm.sh ignore empty-string arguments in order to
simplify some scripting use cases of kvm.sh.  In many cases, as pointed
out by Mathieu Desnoyers, the calling script would do better to use the
bash ${:+} substitution pattern.  For an example already in torture.sh,
${qemu_args:+--qemu-args "$qemu_args"} expands to nothingness if qemu_args
is empty, but otherwise expands to a "--qemu-args " prepended to it value.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 32c3199976388..86dd5c131d226 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -271,6 +271,9 @@ do
 	--trust-make)
 		TORTURE_TRUST_MAKE="y"
 		;;
+	"")
+		# torture.sh can pass empty arguments.  Ignore them.
+		;;
 	*)
 		echo Unknown argument $1
 		usage
-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 6/6] torture: Use ${:+} to save a few lines in torture.sh's torture_one()
  2026-11-16 17:25 [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Paul E. McKenney
                   ` (4 preceding siblings ...)
  2026-11-16 17:26 ` [PATCH 5/6] torture: Make kvm.sh ignore empty-string arguments Paul E. McKenney
@ 2026-11-16 17:26 ` Paul E. McKenney
  2026-11-16 19:00 ` [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Joel Fernandes
  6 siblings, 0 replies; 8+ messages in thread
From: Paul E. McKenney @ 2026-11-16 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, rostedt, Joel Fernandes,
	Paul E. McKenney, Mathieu Desnoyers

This commit uses the ${:+} bash substitution pattern in the torture_one()
function in torture.sh to save a few lines of code.

Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/torture.sh | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index bc842c94c4379..0498fce14ccd6 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -354,16 +354,8 @@ touch $T/successes
 # Note that quoting is problematic.  So on the command line, pass multiple
 # values with multiple kvm.sh argument instances.
 function torture_one {
-	local cur_bootargs=
-	local boottag=
-
 	echo " --- $curflavor:" Start `date` | tee -a $T/log
-	if test -n "$torture_bootargs"
-	then
-		boottag="--bootargs"
-		cur_bootargs="$torture_bootargs"
-	fi
-	"$@" $boottag "$cur_bootargs" --datestamp "$ds/results-$curflavor" > $T/$curflavor.out 2>&1
+	"$@" ${torture_bootargs:+--bootargs "$torture_bootargs"} --datestamp "$ds/results-$curflavor" > $T/$curflavor.out 2>&1
 	retcode=$?
 	resdir="`grep '^Results directory: ' $T/$curflavor.out | tail -1 | sed -e 's/^Results directory: //'`"
 	if test -z "$resdir"
-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/6] Additional miscellaneous RCU updates for v7.5
  2026-11-16 17:25 [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Paul E. McKenney
                   ` (5 preceding siblings ...)
  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 ` Joel Fernandes
  6 siblings, 0 replies; 8+ messages in thread
From: Joel Fernandes @ 2026-11-16 19:00 UTC (permalink / raw)
  To: paulmck; +Cc: rcu, linux-kernel, kernel-team, rostedt

On 11/16, "Paul E. McKenney" <paulmck@kernel.org> wrote:
> Hello!
> 
> This series provides additional miscellaneous updates for v7.5:
> 
> 1.	MAINTAINERS: Add Puranjay Mohan and RCU reviewer.
> 
> 2.	Make torture.sh test NMIs for atomic SRCU on x86.
> 
> 3.	Avoid duplicate identify_qemu_vcpus calls in torture.sh.
> 
> 4.	Make torture.sh test NMIs for RCU on x86.
> 
> 5.	Make kvm.sh ignore empty-string arguments.
> 
> 6.	Use ${:+} to save a few lines in torture.sh's torture_one().

Thanks, I will apply all except 2. and 4. as they depend on Mathieu's series
which is not going in for 7.4:
https://lore.kernel.org/all/20261112133731.127221-1-mathieu.desnoyers@efficios.com/

For the others, I have replaced patches which were already there (in 7.4 next
tree) with the new ones you sent, with updated tags.

thanks,

Joel Fernandes




> 
> 						Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
>  b/MAINTAINERS                                       |    1 
>  b/tools/testing/selftests/rcutorture/bin/kvm.sh     |    3 ++
>  b/tools/testing/selftests/rcutorture/bin/torture.sh |   11 ++++++---
>  tools/testing/selftests/rcutorture/bin/torture.sh   |   23 +++++++++-----------
>  4 files changed, 22 insertions(+), 16 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-16 19:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-16 17:26 ` [PATCH 2/6] rcutorture: Make torture.sh test NMIs for atomic SRCU on x86 Paul E. McKenney
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®