inet_diag: remove three mutexes in diag dumps
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 9 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | sock_diag: annotate data-races around sock_diag_handlers[family]net/ | +5 | 2 replies | Applied |
| 2/9 | inet_diag: annotate data-races around inet_diag_table[]net/ | +3 | 2 replies | Applied |
| 3/9 | inet_diag: add module pointer to "struct inet_diag_handler"include/ net/ net/ +4 more | +8 | 2 replies | Applied |
| 4/9 | inet_diag: allow concurrent operationsnet/ | +40 | 2 replies | Applied |
| 5/9 | sock_diag: add module pointer to "struct sock_diag_handler"include/ net/ net/ +6 more | +10 | 2 replies | Applied |
| 6/9 | sock_diag: allow concurrent operationsnet/ | +42 | 2 replies | Applied |
| 7/9 | sock_diag: allow concurrent operation in sock_diag_rcv_msg()include/ net/ net/ | +40 | 2 replies | Applied |
| 8/9 | sock_diag: remove sock_diag_mutexnet/ | +0 | 2 replies | Applied |
| 9/9 | inet_diag: skip over empty bucketsnet/ | +8 | 2 replies | Applied |
Reviews trailers per patch
All 9 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Willem de Bruijn | Guillaume Nault | Kuniyuki Iwashima |
|---|---|---|---|
| Series | R-b | ||
| 1/9 | R-b | R-b | |
| 2/9 | R-b | R-b | |
| 3/9 | R-b | R-b | |
| 4/9 | R-b | R-b | |
| 5/9 | R-b | R-b | |
| 6/9 | R-b | R-b | |
| 7/9 | R-b | R-b | |
| 8/9 | R-b | R-b | |
| 9/9 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH net-next 0/9] inet_diag: remove three mutexes in diag dumps
Surprisingly, inet_diag operations are serialized over a stack of three mutexes, giving legacy /proc based files an unfair advantage on modern hosts.
This series removes all of them, making inet_diag operations (eg iproute2/ss) fully parallel.
1-2) Two first patches are adding data-race annotations
and can be backported to stable kernels.
3-4) inet_diag_table_mutex can be replaced with RCU protection,
if we add corresponding protection against module unload.
5-7) sock_diag_table_mutex can be replaced with RCU protection,
if we add corresponding protection against module unload.
8) sock_diag_mutex is removed, as the old bug it was working around has been fixed more elegantly.
9) inet_diag_dump_icsk() can skip over empty buckets to reduce spinlock contention.
Eric Dumazet (9):
sock_diag: annotate data-races around sock_diag_handlers[family]
inet_diag: annotate data-races around inet_diag_table[]
inet_diag: add module pointer to "struct inet_diag_handler"
inet_diag: allow concurrent operations
sock_diag: add module pointer to "struct sock_diag_handler"
sock_diag: allow concurrent operations
sock_diag: allow concurrent operation in sock_diag_rcv_msg()
sock_diag: remove sock_diag_mutex
inet_diag: skip over empty buckets
include/linux/inet_diag.h | 1 + include/linux/sock_diag.h | 10 +++- net/core/sock_diag.c | 120 +++++++++++++++++++++----------------- net/dccp/diag.c | 1 + net/ipv4/inet_diag.c | 101 ++++++++++++++++++-------------- net/ipv4/raw_diag.c | 1 + net/ipv4/tcp_diag.c | 1 + net/ipv4/udp_diag.c | 2 + net/mptcp/mptcp_diag.c | 1 + net/netlink/diag.c | 1 + net/packet/diag.c | 1 + net/sctp/diag.c | 1 + net/smc/smc_diag.c | 1 + net/tipc/diag.c | 1 + net/unix/diag.c | 1 + net/vmw_vsock/diag.c | 1 + net/xdp/xsk_diag.c | 1 + 17 files changed, 149 insertions(+), 97 deletions(-)
Signature · 1 line
2.43.0.429.g432eaa2c6b-goog