Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] raw: RCU conversion
@ 2022-06-17 20:10 Eric Dumazet
  2022-06-17 20:10 ` [PATCH net-next 1/2] raw: use more conventional iterators Eric Dumazet
  2022-06-17 20:10 ` [PATCH net-next 2/2] raw: convert raw sockets to RCU Eric Dumazet
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2022-06-17 20:10 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Eric Dumazet, Eric Dumazet

From: Eric Dumazet <edumazet@google.com>

Using rwlock in networking code is extremely risky.
writers can starve if enough readers are constantly
grabing the rwlock.

I thought rwlock were at fault and sent this patch:

https://lkml.org/lkml/2022/6/17/272

But Peter and Linus essentially told me rwlock had to be unfair.

We need to get rid of rwlock in networking stacks.

Without this conversion, following script triggers soft lockups:

for i in {1..48}
do
 ping -f -n -q 127.0.0.1 &
 sleep 0.1
done

Next step will be to convert ping sockets to RCU as well.

Eric Dumazet (2):
  raw: use more conventional iterators
  raw: convert raw sockets to RCU

 include/net/raw.h   |  16 +++--
 include/net/rawv6.h |   7 ++-
 net/ipv4/af_inet.c  |   2 +
 net/ipv4/raw.c      | 150 ++++++++++++++++++--------------------------
 net/ipv4/raw_diag.c |  41 ++++++------
 net/ipv6/af_inet6.c |   3 +
 net/ipv6/raw.c      | 119 +++++++++++++----------------------
 7 files changed, 148 insertions(+), 190 deletions(-)

-- 
2.36.1.476.g0c4daa206d-goog


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

end of thread, other threads:[~2022-06-18  2:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17 20:10 [PATCH net-next 0/2] raw: RCU conversion Eric Dumazet
2022-06-17 20:10 ` [PATCH net-next 1/2] raw: use more conventional iterators Eric Dumazet
2022-06-18  0:57   ` kernel test robot
2022-06-18  0:57   ` kernel test robot
2022-06-18  2:01   ` kernel test robot
2022-06-17 20:10 ` [PATCH net-next 2/2] raw: convert raw sockets to RCU Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox