netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/6] af_unix: Introduce per-netns socket hash table.
@ 2022-06-20 18:51 Kuniyuki Iwashima
  2022-06-20 18:51 ` [PATCH v2 net-next 1/6] af_unix: Clean up some sock_net() uses Kuniyuki Iwashima
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Kuniyuki Iwashima @ 2022-06-20 18:51 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Amit Shah, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

This series replaces unix_socket_table with a per-netns hash table and
reduces lock contention and time on iterating over the list.

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


Changes:
  v2:
    3rd:
      * Update changelog
      * Remove holes from per-netns hash table structure
      * Use kvmalloc_array() instead of kmalloc() (Eric Dumazet)
      * Remove unnecessary parts in af_unix_init() (Eric Dumazet)
      * Move `err_sysctl` label into ifdef block (kernel test robot)
      * Remove struct netns_unix from struct net if CONFIG_UNIX is disabled
    4th:
      * Use spin_lock_nested() (kernel test robot)

  v1: https://lore.kernel.org/netdev/20220616234714.4291-1-kuniyu@amazon.com/


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       |   5 +-
 include/net/net_namespace.h |   2 +
 include/net/netns/unix.h    |   6 +
 net/unix/af_unix.c          | 216 +++++++++++++++++++-----------------
 net/unix/diag.c             |  46 ++++----
 5 files changed, 145 insertions(+), 130 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2022-06-20 21:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-20 18:51 [PATCH v2 net-next 0/6] af_unix: Introduce per-netns socket hash table Kuniyuki Iwashima
2022-06-20 18:51 ` [PATCH v2 net-next 1/6] af_unix: Clean up some sock_net() uses Kuniyuki Iwashima
2022-06-20 18:51 ` [PATCH v2 net-next 2/6] af_unix: Include the whole hash table size in UNIX_HASH_SIZE Kuniyuki Iwashima
2022-06-20 18:51 ` [PATCH v2 net-next 3/6] af_unix: Define a per-netns hash table Kuniyuki Iwashima
2022-06-20 18:51 ` [PATCH v2 net-next 4/6] af_unix: Acquire/Release per-netns hash table's locks Kuniyuki Iwashima
2022-06-20 18:51 ` [PATCH v2 net-next 5/6] af_unix: Put a socket into a per-netns hash table Kuniyuki Iwashima
2022-06-20 18:51 ` [PATCH v2 net-next 6/6] af_unix: Remove unix_table_locks Kuniyuki Iwashima
2022-06-20 21:39   ` kernel test robot
2022-06-20 21:53     ` Kuniyuki Iwashima
2022-06-20 21:39   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).