Thread (5 messages) 5 messages, 2 authors, 2025-07-15
STALE377d
Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH net-next v2 0/1] ppp: Replace per-CPU recursion counter with lock-owner field

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2025-07-10 16:24:08
Also in: linux-rt-devel

This is another approach to avoid relying on local_bh_disable() for
locking of per-CPU in ppp.

I redid it with the per-CPU lock and local_lock_nested_bh() as discussed
in v1. The xmit_recursion counter has been removed since it served the
same purpose as the owner field. Both were updated and checked.

The xmit_recursion looks like a counter in ppp_channel_push() but at
this point, the counter should always be 0 so it always serves as a
boolean. Therefore I removed it.

I do admit that this looks easier to review. On the other hand v1 had a
negative diffstat :)

v1…v2 https://lore.kernel.org/all/20250627105013.Qtv54bEk@linutronix.de/ (local)
  - Instead of rewriting the sequence and adding two owner fields to
    the two variables that may recurse it now adds a per-CPU variable
    for locking and keeping mostly the old code flow.

Sebastian Andrzej Siewior (1):
  ppp: Replace per-CPU recursion counter with lock-owner field

 drivers/net/ppp/ppp_generic.c | 38 ++++++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 9 deletions(-)

-- 
2.50.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help