From: "Paul E. McKenney" <paulmck@kernel.org>
To: Bradley Morgan <brads@mainlining.org>
Cc: kunwu.chan@gmail.com, boqun@kernel.org, dave@stgolabs.net,
frederic@kernel.org, jiangshanlai@gmail.com,
joelagnelf@nvidia.com, josh@joshtriplett.org,
linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com,
neeraj.upadhyay@kernel.org, qiang.zhang@linux.dev,
rcu@vger.kernel.org, rostedt@goodmis.org, urezki@gmail.com
Subject: Re: [PATCH v2] rcuscale: add srcua scale type
Date: Sat, 3 Oct 2026 16:43:48 -0700 [thread overview]
Message-ID: <463c8f04-e08b-49b7-b16f-e65def841cb6@paulmck-laptop> (raw)
In-Reply-To: <A3BA2086-5718-45BB-8B3E-35C1D2CA7B63@mainlining.org>
On Sat, Oct 03, 2026 at 06:52:44PM +0100, Bradley Morgan wrote:
> On 3 October 2026 17:17:19 BST, Kunwu Chan <kunwu.chan@gmail.com> wrote:
> >Add support for scaling atomic SRCU grace periods using
> >srcu_read_lock_atomic()/srcu_read_unlock_atomic() and
> >synchronize_srcu_atomic().
> >
> >Suggested-by: Paul E. McKenney <paulmck@kernel.org>
> >Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
>
> 1: why didn't u cc me
> 2: why did you ommit my tag? I tend to review based on correctness, cuz idk pauls preferences, once I do I'll be a better rcu reviewer.
Take it easy, Bradley.
Many in the Linux kernel community consider it polite to drop a tag
from (or, as in this case, avoid adding a tag to) a patch that changed
significantly. On the CC issue, you did find the patch the first time
without him CCing you. ;-)
Kunwu did nothing wrong here.
Thanx, Paul
> >---
> >Changes since v1:
> >- Rename srcu_atomic_ctlp to srcua and reuse srcu_ctlp for
> > SRCU operations, as suggested by Paul.
> >- Reuse the existing SRCU cleanup and completed helpers by
> > initializing srcu_ctlp in srcu_atomic_scale_init().
> >- Add .stats using srcu_scale_stats().
> >- Use "srcua" to match the existing "srcu" and "srcud" scale
> > type names.
> >- Use synchronize_srcu_atomic() for both normal and expedited
> > scale tests.
> >
> >v1: https://lore.kernel.org/all/20260927100359.3903688-1-kunwu.chan@gmail.com/
> >Tested with kvm.sh --torture rcuscale scale_type=srcua on x86_64 and
> >arm64, alongside gp_exp=1 and PROVE_LOCKING=y: no warnings or lockdep
> >splats.
> >---
> > kernel/rcu/rcuscale.c | 41 ++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 40 insertions(+), 1 deletion(-)
> >
> >diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
> >index 1097ec15879c..b172882824ac 100644
> >--- a/kernel/rcu/rcuscale.c
> >+++ b/kernel/rcu/rcuscale.c
> >@@ -293,6 +293,44 @@ static struct rcu_scale_ops srcud_ops = {
> > .name = "srcud"
> > };
> >
> >+static struct srcu_struct srcua;
> >+
> >+static int srcu_scale_atomic_read_lock(void)
> >+{
> >+ return srcu_read_lock_atomic(srcu_ctlp);
> >+}
> >+
> >+static void srcu_scale_atomic_read_unlock(int idx)
> >+{
> >+ srcu_read_unlock_atomic(srcu_ctlp, idx);
> >+}
> >+
> >+static void srcu_scale_atomic_synchronize(void)
> >+{
> >+ synchronize_srcu_atomic(srcu_ctlp);
> >+}
> >+
> >+static void srcu_atomic_scale_init(void)
> >+{
> >+ srcu_ctlp = &srcua;
> >+ init_srcu_struct_atomic(srcu_ctlp);
> >+}
> >+
> >+static struct rcu_scale_ops srcua_ops = {
> >+ .ptype = SRCU_FLAVOR,
> >+ .init = srcu_atomic_scale_init,
> >+ .cleanup = srcu_sync_scale_cleanup,
> >+ .readlock = srcu_scale_atomic_read_lock,
> >+ .readunlock = srcu_scale_atomic_read_unlock,
> >+ .get_gp_seq = srcu_scale_completed,
> >+ .gp_diff = rcu_seq_diff,
> >+ .exp_completed = srcu_scale_completed,
> >+ .sync = srcu_scale_atomic_synchronize,
> >+ .exp_sync = srcu_scale_atomic_synchronize,
> >+ .stats = srcu_scale_stats,
> >+ .name = "srcua"
> >+};
> >+
> > #ifdef CONFIG_TASKS_RCU
> >
> > /*
> >@@ -1110,7 +1148,8 @@ rcu_scale_init(void)
> > long i;
> > long j;
> > static struct rcu_scale_ops *scale_ops[] = {
> >- &rcu_ops, &srcu_ops, &srcud_ops, TASKS_OPS TASKS_RUDE_OPS TASKS_TRACING_OPS
> >+ &rcu_ops, &srcu_ops, &srcua_ops, &srcud_ops,
> >+ TASKS_OPS TASKS_RUDE_OPS TASKS_TRACING_OPS
> > };
> >
> > if (!torture_init_begin(scale_type, verbose))
> >
> >base-commit: d21906b0aa1e9573cdb5e7acaca44966b9d1dcd2
> >
>
> --- Thanks!
> "I'm not a very positive person" - Linus torvalds
next prev parent reply other threads:[~2026-10-03 23:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 16:17 Kunwu Chan
2026-10-03 17:52 ` Bradley Morgan
2026-10-03 23:43 ` Paul E. McKenney [this message]
2026-10-03 23:52 ` Bradley Morgan
2026-10-04 0:17 ` Paul E. McKenney
2026-10-04 0:33 ` Joel Fernandes
2026-10-04 3:14 ` KunWu Chan
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=463c8f04-e08b-49b7-b16f-e65def841cb6@paulmck-laptop \
--to=paulmck@kernel.org \
--cc=boqun@kernel.org \
--cc=brads@mainlining.org \
--cc=dave@stgolabs.net \
--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=mathieu.desnoyers@efficios.com \
--cc=neeraj.upadhyay@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®