netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/1] ppp: Replace per-CPU recursion counter with lock-owner field
@ 2025-07-15 15:08 Sebastian Andrzej Siewior
  2025-07-15 15:08 ` [PATCH net-next v3 1/1] " Sebastian Andrzej Siewior
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-07-15 15:08 UTC (permalink / raw)
  To: netdev, linux-rt-devel, linux-ppp
  Cc: David S. Miller, Andrew Lunn, Clark Williams, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Steven Rostedt,
	Thomas Gleixner, Guillaume Nault, Sebastian Andrzej Siewior

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.

v2…v3 https://lore.kernel.org/all/20250710162403.402739-1-bigeasy@linutronix.de/
  - rebase on top of net-next
  - replace "ppp channel" with "ppp unit" in the patch description

v1…v2 https://lore.kernel.org/all/20250627105013.Qtv54bEk@linutronix.de/
  - 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-17 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15 15:08 [PATCH net-next v3 0/1] ppp: Replace per-CPU recursion counter with lock-owner field Sebastian Andrzej Siewior
2025-07-15 15:08 ` [PATCH net-next v3 1/1] " Sebastian Andrzej Siewior
2025-07-15 17:37 ` [PATCH net-next v3 0/1] " Guillaume Nault
2025-07-17 13:40 ` Paolo Abeni
2025-07-17 13:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).