Re: [PATCH v14 09/12] unwind deferred: Use SRCU unwind_deferred_task_work()

From
Paul E. McKenney <paulmck@kernel.org>
Date
2025-07-17 15:48:40
Also in
bpf, lkml
Reply to
Steven Rostedt, 2025-07-17
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" [off-list ref] wrote:
quoted
quoted
+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/ (local)
for a srcu_fast_notrace, so something like this:
Yeah, I already saw that patch.
quoted
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
Thread (21 messages) 21 messages, 3 authors, last reply 2025-07-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help