From: "Paul E. McKenney" <paulmck@kernel.org>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: Breno Leitao <leitao@debian.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Waiman Long <longman@redhat.com>,
aeh@meta.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, edumazet@google.com, jhs@mojatatu.com,
kernel-team@meta.com, Erik Lundgren <elundgren@meta.com>,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Joel Fernandes <joel@joelfernandes.org>,
Uladzislau Rezki <urezki@gmail.com>,
rcu@vger.kernel.org
Subject: Re: [RFC PATCH 3/8] shazptr: Add refscale test for wildcard
Date: Thu, 10 Jul 2025 17:42:40 -0700 [thread overview]
Message-ID: <ccb7d433-0ff8-4bbc-8c76-be2d391fb06a@paulmck-laptop> (raw)
In-Reply-To: <20250414060055.341516-4-boqun.feng@gmail.com>
On Sun, Apr 13, 2025 at 11:00:50PM -0700, Boqun Feng wrote:
> Add the refscale test for shazptr, which starts another shazptr critical
> section inside an existing one to measure the reader side performance
> when wildcard logic is triggered.
>
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
With or without the same ref_shazptr_init() fix as the preview patch:
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
> ---
> kernel/rcu/refscale.c | 40 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
> index 154520e4ee4c..fdbb4a2c91fe 100644
> --- a/kernel/rcu/refscale.c
> +++ b/kernel/rcu/refscale.c
> @@ -928,6 +928,44 @@ static const struct ref_scale_ops shazptr_ops = {
> .name = "shazptr"
> };
>
> +static void ref_shazptr_wc_read_section(const int nloops)
> +{
> + int i;
> +
> + for (i = nloops; i >= 0; i--) {
> + preempt_disable();
> + {
> + guard(shazptr)(ref_shazptr_read_section);
> + /* Trigger wildcard logic */
> + guard(shazptr)(ref_shazptr_wc_read_section);
> + }
> + preempt_enable();
> + }
> +}
> +
> +static void ref_shazptr_wc_delay_section(const int nloops, const int udl, const int ndl)
> +{
> + int i;
> +
> + for (i = nloops; i >= 0; i--) {
> + preempt_disable();
> + {
> + guard(shazptr)(ref_shazptr_delay_section);
> + /* Trigger wildcard logic */
> + guard(shazptr)(ref_shazptr_wc_delay_section);
> + un_delay(udl, ndl);
> + }
> + preempt_enable();
> + }
> +}
> +
> +static const struct ref_scale_ops shazptr_wildcard_ops = {
> + .init = ref_shazptr_init,
> + .readsection = ref_shazptr_wc_read_section,
> + .delaysection = ref_shazptr_wc_delay_section,
> + .name = "shazptr_wildcard"
> +};
> +
> static void rcu_scale_one_reader(void)
> {
> if (readdelay <= 0)
> @@ -1235,7 +1273,7 @@ ref_scale_init(void)
> &refcnt_ops, &rwlock_ops, &rwsem_ops, &lock_ops, &lock_irq_ops,
> &acqrel_ops, &sched_clock_ops, &clock_ops, &jiffies_ops,
> &typesafe_ref_ops, &typesafe_lock_ops, &typesafe_seqlock_ops,
> - &shazptr_ops,
> + &shazptr_ops, &shazptr_wildcard_ops,
> };
>
> if (!torture_init_begin(scale_type, verbose))
> --
> 2.47.1
>
next prev parent reply other threads:[~2025-07-11 0:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 6:00 [RFC PATCH 0/8] Introduce simple hazard pointers for lockdep Boqun Feng
2025-04-14 6:00 ` [RFC PATCH 1/8] Introduce simple hazard pointers Boqun Feng
2025-07-11 0:36 ` Paul E. McKenney
2025-04-14 6:00 ` [RFC PATCH 2/8] shazptr: Add refscale test Boqun Feng
2025-07-11 0:41 ` Paul E. McKenney
2025-04-14 6:00 ` [RFC PATCH 3/8] shazptr: Add refscale test for wildcard Boqun Feng
2025-07-11 0:42 ` Paul E. McKenney [this message]
2025-04-14 6:00 ` [RFC PATCH 4/8] shazptr: Avoid synchronize_shaptr() busy waiting Boqun Feng
2025-07-11 0:56 ` Paul E. McKenney
2025-07-11 2:29 ` Boqun Feng
2025-04-14 6:00 ` [RFC PATCH 5/8] shazptr: Allow skip self scan in synchronize_shaptr() Boqun Feng
2025-07-11 0:58 ` Paul E. McKenney
2025-04-14 6:00 ` [RFC PATCH 6/8] rcuscale: Allow rcu_scale_ops::get_gp_seq to be NULL Boqun Feng
2025-07-11 1:00 ` Paul E. McKenney
2025-04-14 6:00 ` [RFC PATCH 7/8] rcuscale: Add tests for simple hazard pointers Boqun Feng
2025-07-11 1:03 ` Paul E. McKenney
2025-04-14 6:00 ` [RFC PATCH 8/8] locking/lockdep: Use shazptr to protect the key hashlist Boqun Feng
2025-07-11 1:04 ` Paul E. McKenney
2025-04-16 14:14 ` [RFC PATCH 0/8] Introduce simple hazard pointers for lockdep Breno Leitao
2025-04-16 15:04 ` Uladzislau Rezki
2025-04-16 18:33 ` Breno Leitao
2025-04-17 8:22 ` Uladzislau Rezki
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=ccb7d433-0ff8-4bbc-8c76-be2d391fb06a@paulmck-laptop \
--to=paulmck@kernel.org \
--cc=aeh@meta.com \
--cc=boqun.feng@gmail.com \
--cc=edumazet@google.com \
--cc=elundgren@meta.com \
--cc=frederic@kernel.org \
--cc=jhs@mojatatu.com \
--cc=joel@joelfernandes.org \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=neeraj.upadhyay@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=urezki@gmail.com \
--cc=will@kernel.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 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®