Re: [PATCH v2 4/7] srcu: Add irqsave variants of the atomic SRCU readers

From: Mathieu Desnoyers

Date: Wed Nov 11 2026 - 20:51:30 EST


On 2026-11-11 19:07, Paul E. McKenney wrote:
[...]
Although that doesn't help on my laptop, it does work on my x86 test
system.

Is the laptop a hybrid CPU, with P-cores and E-cores? KVM gives its
guests no PMU on those. kvm_init_pmu_capability() in arch/x86/kvm/pmu.c
clears enable_pmu under X86_FEATURE_HYBRID_CPU.

Perhaps something like the following would be helpful in keeping this
well-tested?

Yes, that would help. Three comments on the patch:

[...]
+ qemu_args='--qemu-args "-cpu host,pmu=on"'
[...]
+ --configs "SRCU-P" ${qemu_args} --trust-make

1) The quotes inside the variable stay literal. The expansion is split
on spaces, so kvm.sh gets three words:

--qemu-args
"-cpu
host,pmu=on"

A kvm.sh --dryrun with these arguments stops with:

--qemu-args (qemu arguments) ""-cpu" must match "^-"

Keeping only the value in the variable works:

qemu_arg="-cpu host,pmu=on"
[...]
--configs "SRCU-P" ${qemu_arg:+--qemu-args "$qemu_arg"} --trust-make

It expands to two words when set, and to nothing when empty. I
checked it with kvm.sh --dryrun only.

2) nmi_readers and nmi_calls both default to true. So the two boot
arguments change nothing. They are fine if you want them explicit.

3) The "atomic-srcu" run just above also runs readers in NMI, by
default. It still starts without a PMU, so it keeps printing the
"went untested" lines. It could take the same qemu argument.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com