[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41c204c0-eabc-4f4f-93f4-2568e2f962a9@paulmck-laptop>
Date: Thu, 17 Jul 2025 08:48:40 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Steven Rostedt <rostedt@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, bpf@...r.kernel.org,
x86@...nel.org, Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrii Nakryiko <andrii@...nel.org>,
Indu Bhagat <indu.bhagat@...cle.com>,
"Jose E. Marchesi" <jemarch@....org>,
Beau Belgrave <beaub@...ux.microsoft.com>,
Jens Remus <jremus@...ux.ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>, Florian Weimer <fweimer@...hat.com>,
Sam James <sam@...too.org>
Subject: Re: [PATCH v14 09/12] unwind deferred: Use SRCU
unwind_deferred_task_work()
On Thu, Jul 17, 2025 at 08:25:26AM -0400, Steven Rostedt wrote:
> On Wed, 16 Jul 2025 21:43:47 -0700
> "Paul E. McKenney" <paulmck@...nel.org> wrote:
>
> > > +DEFINE_LOCK_GUARD_1(srcu_lite, struct srcu_struct,
> >
> > You need srcu_fast because srcu_lite is being removed. They are quite
> > similar, but srcu_fast is faster and is NMI-safe. (This last might or
> > might not matter here.)
> >
> > See https://lore.kernel.org/all/20250716225418.3014815-3-paulmck@kernel.org/
> > for a srcu_fast_notrace, so something like this:
>
> Yeah, I already saw that patch.
>
> >
> > DEFINE_LOCK_GUARD_1(srcu_fast, struct srcu_struct,
> > _T->scp = srcu_read_lock_fast(_T->lock),
> > srcu_read_unlock_fast(_T->lock, _T->scp),
> > struct srcu_ctr __percpu *scp)
> >
> > Other than that, it looks plausible.
>
> Using srcu_lite or srcu_fast is an optimization here. And since I saw you
> adding the guard for srcu_fast in that other thread, I'll just use normal
> SRCU here for this series, and in the future we could convert it over to
> srcu_fast.
Works for me!
That said, "in the future" started in -next some time back and is slated
to start in mainline in the upcoming v6.17 merge window. SRCU-lite is
being removed from the kernel, and has been deprecated via checkpatch.pl.
So if there is some reason that you absolutely cannot immediately convert
to SRCU-fast, let's please discuss.
Thanx, Paul
Powered by blists - more mailing lists