mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: paulmck@kernel.org
Cc: linux-kernel@vger.kernel.org,
	David Woodhouse <dwmw2@infradead.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun@kernel.org>,
	Uladzislau Rezki <urezki@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang@linux.dev>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Kunwu Chan <kunwu.chan@gmail.com>,
	Puranjay Mohan <puranjay@kernel.org>,
	rcu@vger.kernel.org
Subject: Re: [PATCH v2 4/7] srcu: Add irqsave variants of the atomic SRCU readers
Date: Wed, 11 Nov 2026 20:32:48 -0500	[thread overview]
Message-ID: <fc1bbc25-a410-42bd-b5b9-d734d2444b70@efficios.com> (raw)
In-Reply-To: <9fc742ab-457c-41e2-ba05-0ef0bb15d00b@paulmck-laptop>

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

  reply	other threads:[~2026-11-12  1:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 14:59 [PATCH v2 0/7] srcu: NMI-safe atomic SRCU readers, and their irqsave forms Mathieu Desnoyers
2026-11-11 14:59 ` [PATCH v2 1/7] srcutiny: Do not call synchronize_rcu() from synchronize_srcu_atomic() Mathieu Desnoyers
2026-11-11 18:35   ` Paul E. McKenney
2026-11-11 14:59 ` [PATCH v2 2/7] srcu: Rule for using synchronize_srcu_atomic() from interrupt handlers Mathieu Desnoyers
2026-11-11 18:54   ` Paul E. McKenney
2026-11-11 14:59 ` [PATCH v2 3/7] srcu: Make atomic SRCU readers NMI-safe Mathieu Desnoyers
2026-11-11 19:55   ` Paul E. McKenney
2026-11-11 14:59 ` [PATCH v2 4/7] srcu: Add irqsave variants of the atomic SRCU readers Mathieu Desnoyers
2026-11-11 19:58   ` Paul E. McKenney
2026-11-11 20:04     ` Paul E. McKenney
2026-11-11 20:13       ` Mathieu Desnoyers
2026-11-12  0:07         ` Paul E. McKenney
2026-11-12  1:32           ` Mathieu Desnoyers [this message]
2026-11-12  2:13             ` Paul E. McKenney
2026-11-11 14:59 ` [PATCH v2 5/7] rcutorture: Run NMI-safe SRCU readers from NMI Mathieu Desnoyers
2026-11-12  0:39   ` Paul E. McKenney
2026-11-11 14:59 ` [PATCH v2 6/7] rcutorture: Test the irqsave forms of atomic SRCU readers Mathieu Desnoyers
2026-11-12  0:45   ` Paul E. McKenney
2026-11-11 14:59 ` [PATCH v2 7/7] rcutorture: Check an atomic SRCU wait within an RCU reader Mathieu Desnoyers
2026-11-12  0:46   ` Paul E. McKenney
2026-11-11 19:02 ` [PATCH v2 0/7] srcu: NMI-safe atomic SRCU readers, and their irqsave forms David Woodhouse
2026-11-11 19:33   ` Mathieu Desnoyers
2026-11-11 19:35     ` Paul E. McKenney
2026-11-11 19:37     ` David Woodhouse
2026-11-11 19:40       ` Mathieu Desnoyers
2026-11-11 19:50         ` Paul E. McKenney
2026-11-11 19:34   ` Paul E. McKenney
2026-11-12  1:53 ` David Woodhouse

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=fc1bbc25-a410-42bd-b5b9-d734d2444b70@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=boqun@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=dwmw2@infradead.org \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joelagnelf@nvidia.com \
    --cc=josh@joshtriplett.org \
    --cc=kunwu.chan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=puranjay@kernel.org \
    --cc=qiang.zhang@linux.dev \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=urezki@gmail.com \
    /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

all inboxes | Powered by JetHome®