Re: [PATCH v2 4/7] srcu: Add irqsave variants of the atomic SRCU readers
From: Paul E. McKenney
Date: Thu Nov 12 2026 - 17:59:12 EST
On Wed, Nov 11, 2026 at 08:25:30PM -0800, Paul E. McKenney wrote:
> On Wed, Nov 11, 2026 at 09:50:26PM -0500, Mathieu Desnoyers wrote:
> > On 2026-11-11 21:13, Paul E. McKenney wrote:
> > [...]
> > > I used the same trick that I have used elsewhere, keeping a separate
> > > variable for the tag ("--qemu-args") and the argument itself, as shown
> > > in the diff below on top of my earlier patch.
> > [...]
> > > + --configs "SRCU-P" "${qemu_tag}" "${qemu_args}" --trust-make
> >
> > This works on x86. On arm64 both variables are empty, so kvm.sh gets
> > two empty arguments. A kvm.sh --dryrun with "" "" in that place stops
> > with:
> >
> > Unknown argument
> >
> > Dropping the quotes does not help: the value has a space in it. So I
> > think this one needs either the ${qemu_arg:+...} form, or a test around
> > the torture_set call.
>
> Ah, you need the kvm.sh hunk of this commit in my -rcu tree:
>
> 436f3c6b27de ("torture.sh: Add hazptr torturing")
>
> Which I clearly need to extract from hazard pointers and get more widely
> available. Diff shown below.
But after playing with the ${:+} syntax a bit more, sold!!! Thank you
for the tutorial.
I will be applying that to the hazard-pointers stack as well, but keeping
the forgiveness of empty arguments just in case.
Thanx, Paul
> > > I will add it there, also.
> > >
> > > And to the --do-rcutorture stuff as well.
> >
> > Sounds good.
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> 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
>