net: add sk_wake_async_rcu() helper
While looking at UDP receive performance, I saw sk_wake_async() was no longer inlined. This matters at least on AMD Zen1-4 platforms (see SRSO) This might be because rcu_read_lock() and rcu_read_unlock() are no longer nops in recent kernels ? Add sk_wake_async_rcu() variant, which must be called from contexts already holding rcu lock. As SOCK_FASYNC is deprecated in modern days, use unlikely() to give a hint to the compiler. sk_wake_async_rcu() is properly inlined from __udp_enqueue_schedule_skb() and sock_def_readable(). Signed-off-by:Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20240328144032.1864988-5-edumazet@google.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
Showing
- crypto/af_alg.c 2 additions, 2 deletionscrypto/af_alg.c
- include/net/sock.h 6 additions, 0 deletionsinclude/net/sock.h
- net/atm/common.c 1 addition, 1 deletionnet/atm/common.c
- net/core/sock.c 4 additions, 4 deletionsnet/core/sock.c
- net/dccp/output.c 1 addition, 1 deletionnet/dccp/output.c
- net/ipv4/udp.c 1 addition, 1 deletionnet/ipv4/udp.c
- net/iucv/af_iucv.c 1 addition, 1 deletionnet/iucv/af_iucv.c
- net/rxrpc/af_rxrpc.c 1 addition, 1 deletionnet/rxrpc/af_rxrpc.c
- net/sctp/socket.c 1 addition, 1 deletionnet/sctp/socket.c
- net/smc/smc_rx.c 2 additions, 2 deletionsnet/smc/smc_rx.c
- net/unix/af_unix.c 1 addition, 1 deletionnet/unix/af_unix.c
Please register or sign in to comment