[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250625100317.GC1613376@noisy.programming.kicks-ass.net>
Date: Wed, 25 Jun 2025 12:03:17 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Boqun Feng <boqun.feng@...il.com>
Cc: linux-kernel@...r.kernel.org, rcu@...r.kernel.org, lkmm@...ts.linux.dev,
Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Davidlohr Bueso <dave@...olabs.net>,
"Paul E. McKenney" <paulmck@...nel.org>,
Josh Triplett <josh@...htriplett.org>,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <neeraj.upadhyay@...nel.org>,
Joel Fernandes <joelagnelf@...dia.com>,
Uladzislau Rezki <urezki@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Zqiang <qiang.zhang@...ux.dev>, Breno Leitao <leitao@...ian.org>,
aeh@...a.com, netdev@...r.kernel.org, edumazet@...gle.com,
jhs@...atatu.com, kernel-team@...a.com,
Erik Lundgren <elundgren@...a.com>
Subject: Re: [PATCH 3/8] shazptr: Add refscale test for wildcard
On Tue, Jun 24, 2025 at 08:10:56PM -0700, Boqun Feng wrote:
> +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();
> + }
> +}
Same as the last one, scoped_guard (preempt) can replace the preempt
things and the scope.
Powered by blists - more mailing lists