mbox series

[v1,net-next,0/6] af_unix: Introduce per-netns socket hash table.

Message ID 20220616234714.4291-1-kuniyu@amazon.com (mailing list archive)
Headers show
Series af_unix: Introduce per-netns socket hash table. | expand

Message

Kuniyuki Iwashima June 16, 2022, 11:47 p.m. UTC
This series replaces unix_socket_table with a per-netns hash table and
reduce lock contention.

Note the 3rd-6th patches can be a single patch, but for ease of review,
they are split into small changes without breakage.


Kuniyuki Iwashima (6):
  af_unix: Clean up some sock_net() uses.
  af_unix: Include the whole hash table size in UNIX_HASH_SIZE.
  af_unix: Define a per-netns hash table.
  af_unix: Acquire/Release per-netns hash table's locks.
  af_unix: Put a socket into a per-netns hash table.
  af_unix: Remove unix_table_locks.

 include/net/af_unix.h    |  10 +-
 include/net/netns/unix.h |   2 +
 net/unix/af_unix.c       | 213 +++++++++++++++++++++------------------
 net/unix/diag.c          |  47 ++++-----
 4 files changed, 143 insertions(+), 129 deletions(-)