From: "Alejandro Vallejo" <alejandro.garciavallejo@amd.com>
To: "Roger Pau Monne" <roger@xenproject.org>,
<xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH v2 2/3] xen/rcu: simplify RCU implementation
Date: Mon, 28 Sep 2026 10:31:20 +0200 [thread overview]
Message-ID: <DLQT5IL8T1B9.1GN63C5Q17HGH@amd.com> (raw)
In-Reply-To: <20260925163025.65217-3-roger@xenproject.org>
On Fri Sep 25, 2026 at 6:30 PM CEST, Roger Pau Monne wrote:
> The current implementation has two shortcomings for certain Xen usages:
>
> * When using the null scheduler it's possible for a CPU to never enter Xen
> context. A CPU not entering Xen context can block other CPUs from
> executing RCU callbacks, as there will be no quiescent state observed if
> the CPU doesn't enter Xen context.
>
> * If a certain amount of callbacks are pending, RCU will try to force a
> quiescent state, by sending an IPI to remote CPUs. This causes unwanted
> interference.
>
> Keep track of the RCU epoch when a callback was added, and only execute it
> once all CPUs are either outside of RCU critical regions, or any CPUs
> inside of RCU critical regions have entered such past the epoch when the
> callback was queued. Knowing whether a CPU is inside a RCU critical region
> is done based on the CPU rcu_lock_cnt value.
>
> This removes the grace/quiescent period state tracking entirely: the
> control block, the per-CPU quiescent bookkeeping, the batch lists and the
> forced-quiescent-state IPI all go away. As a result no RCU-driven IPIs are
> sent to remote CPUs, and callback progress no longer depends on every CPU
> passing through Xen context.
>
> Signed-off-by: Roger Pau Monné <roger@xenproject.org>
All review I already did on this was on the applied patch. I find the
diff a bit too unwieldy. Perhaps it might be good to add the new logic
on top first, and then remove the prior logic.
Something like:
#define RCU_USES_EPOCH 1
#ifdef RCU_USES_EPOCH
<old rcu specifics>
#else
<new rcu specifics>
#endif
... then have a last patch that drops old RCU code. Structs, older
functions, etc can stay until then, because they'll be removed later.
It's just a means of shrinking the diff in order to make it tractable.
My .02, anyway. Perhaps you already tried and it's terrible anyhow.
Cheers,
Alejandro
next prev parent reply other threads:[~2026-09-28 8:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 16:30 [PATCH v2 0/3] xen/rcu: rework the RCU logic Roger Pau Monne
2026-09-25 16:30 ` [PATCH v2 1/3] xen/rcu: introduce the concept of RCU epoch Roger Pau Monne
2026-09-28 8:24 ` Alejandro Vallejo
2026-09-29 14:20 ` Roger Pau Monné
2026-09-29 14:52 ` Jan Beulich
2026-09-29 22:14 ` Alejandro Vallejo
2026-09-30 5:58 ` Jan Beulich
2026-09-30 8:09 ` Roger Pau Monné
2026-09-30 8:34 ` Jan Beulich
2026-09-30 10:07 ` Roger Pau Monné
2026-09-30 10:31 ` Jan Beulich
2026-09-30 11:56 ` Alejandro Vallejo
2026-09-30 8:32 ` Roger Pau Monné
2026-09-30 11:59 ` Alejandro Vallejo
2026-09-25 16:30 ` [PATCH v2 2/3] xen/rcu: simplify RCU implementation Roger Pau Monne
2026-09-28 8:31 ` Alejandro Vallejo [this message]
2026-09-28 9:05 ` Alejandro Vallejo
2026-09-29 13:53 ` Roger Pau Monné
2026-09-25 16:30 ` [PATCH v2 3/3] xen/rcu: remove rcu_quiesce_{disable,enable}() Roger Pau Monne
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=DLQT5IL8T1B9.1GN63C5Q17HGH@amd.com \
--to=alejandro.garciavallejo@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger@xenproject.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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.