All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/13] af_unix: Replace unix_table_lock with per-hash locks.
@ 2021-11-06  9:16 Kuniyuki Iwashima
  2021-11-06  9:17 ` [PATCH net-next 01/13] af_unix: Use offsetof() instead of sizeof() Kuniyuki Iwashima
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Kuniyuki Iwashima @ 2021-11-06  9:16 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: Kuniyuki Iwashima, Kuniyuki Iwashima, Benjamin Herrenschmidt, netdev

The hash table of AF_UNIX sockets is protected by a single big lock,
unix_table_lock.  This series replaces it with small per-hash locks.

1st -  2nd : Misc refactoring
3rd -  8th : Separate BSD/abstract address logics
9th - 11th : Prep to save a hash in each socket
12th       : Replace the big lock
13th       : Speed up autobind()

After this series land in bpf-next, I will post another series to support
bpf batching iteration and bpf_(get|set)sockopt for AF_UNIX sockets.


Kuniyuki Iwashima (13):
  af_unix: Use offsetof() instead of sizeof().
  af_unix: Pass struct sock to unix_autobind().
  af_unix: Factorise unix_find_other() based on address types.
  af_unix: Return an error as a pointer in unix_find_other().
  af_unix: Cut unix_validate_addr() out of unix_mkname().
  af_unix: Copy unix_mkname() into unix_find_(bsd|abstract)().
  af_unix: Remove unix_mkname().
  af_unix: Allocate unix_address in unix_bind_(bsd|abstract)().
  af_unix: Remove UNIX_ABSTRACT() macro and test sun_path[0] instead.
  af_unix: Add helpers to calculate hashes.
  af_unix: Save hash in sk_hash.
  af_unix: Replace the big lock with small locks.
  af_unix: Relax race in unix_autobind().

 include/net/af_unix.h                         |   3 +-
 net/unix/af_unix.c                            | 556 ++++++++++--------
 net/unix/diag.c                               |  23 +-
 .../selftests/bpf/progs/bpf_iter_unix.c       |   2 +-
 .../selftests/bpf/progs/bpf_tracing_net.h     |   2 -
 .../bpf/progs/test_skc_to_unix_sock.c         |   2 +-
 6 files changed, 334 insertions(+), 254 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-11-10  6:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-06  9:16 [PATCH net-next 00/13] af_unix: Replace unix_table_lock with per-hash locks Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 01/13] af_unix: Use offsetof() instead of sizeof() Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 02/13] af_unix: Pass struct sock to unix_autobind() Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 03/13] af_unix: Factorise unix_find_other() based on address types Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 04/13] af_unix: Return an error as a pointer in unix_find_other() Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 05/13] af_unix: Cut unix_validate_addr() out of unix_mkname() Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 06/13] af_unix: Copy unix_mkname() into unix_find_(bsd|abstract)() Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 07/13] af_unix: Remove unix_mkname() Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 08/13] af_unix: Allocate unix_address in unix_bind_(bsd|abstract)() Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 09/13] af_unix: Remove UNIX_ABSTRACT() macro and test sun_path[0] instead Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 10/13] af_unix: Add helpers to calculate hashes Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 11/13] af_unix: Save hash in sk_hash Kuniyuki Iwashima
2021-11-06  9:17 ` [PATCH net-next 12/13] af_unix: Replace the big lock with small locks Kuniyuki Iwashima
2021-11-10  6:39   ` [af_unix] 95e381b609: WARNING:possible_recursive_locking_detected kernel test robot
2021-11-10  6:39     ` kernel test robot
2021-11-06  9:17 ` [PATCH net-next 13/13] af_unix: Relax race in unix_autobind() Kuniyuki Iwashima
2021-11-08 23:10   ` Eric Dumazet
2021-11-09  2:24     ` Kuniyuki Iwashima

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.