All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] netns: speedup netns dismantles
@ 2022-01-24 20:24 Eric Dumazet
  2022-01-24 20:24 ` [PATCH net-next 1/6] tcp/dccp: add tw->tw_bslot Eric Dumazet
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Eric Dumazet @ 2022-01-24 20:24 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski; +Cc: netdev, Eric Dumazet, Eric Dumazet

From: Eric Dumazet <edumazet@google.com>

netns are dismantled by a single thread, from cleanup_net()

On hosts with many TCP sockets, and/or many cpus, this thread
is spending too many cpu cycles, and can not keep up with some
workloads.

- Removing 3*num_possible_cpus() sockets per netns, for icmp and tcp protocols.
- Iterating over all TCP sockets to remove stale timewait sockets.

This patch series removes ~50% of cleanup_net() cpu costs on
hosts with 256 cpus. It also reduces per netns memory footprint.

Eric Dumazet (6):
  tcp/dccp: add tw->tw_bslot
  tcp/dccp: no longer use twsk_net(tw) from tw_timer_handler()
  tcp/dccp: get rid of inet_twsk_purge()
  ipv4: do not use per netns icmp sockets
  ipv6: do not use per netns icmp sockets
  ipv4/tcp: do not use per netns ctl sockets

 include/net/inet_timewait_sock.h |  8 ++-
 include/net/netns/ipv4.h         |  2 -
 include/net/netns/ipv6.h         |  1 -
 net/dccp/ipv4.c                  |  6 ---
 net/dccp/ipv6.c                  |  6 ---
 net/ipv4/icmp.c                  | 91 +++++++++++---------------------
 net/ipv4/inet_timewait_sock.c    | 67 ++++-------------------
 net/ipv4/tcp_ipv4.c              | 63 ++++++++++------------
 net/ipv6/icmp.c                  | 62 ++++------------------
 net/ipv6/tcp_ipv6.c              |  6 ---
 10 files changed, 82 insertions(+), 230 deletions(-)

-- 
2.35.0.rc0.227.g00780c9af4-goog


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

end of thread, other threads:[~2022-02-07  5:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 20:24 [PATCH net-next 0/6] netns: speedup netns dismantles Eric Dumazet
2022-01-24 20:24 ` [PATCH net-next 1/6] tcp/dccp: add tw->tw_bslot Eric Dumazet
2022-01-24 20:24 ` [PATCH net-next 2/6] tcp/dccp: no longer use twsk_net(tw) from tw_timer_handler() Eric Dumazet
2022-01-24 20:24 ` [PATCH net-next 3/6] tcp/dccp: get rid of inet_twsk_purge() Eric Dumazet
2022-02-07  3:02   ` [tcp/dccp] f6408a8641: BUG:KASAN:use-after-free_in_inet_twsk_kill kernel test robot
2022-02-07  3:02     ` kernel test robot
2022-02-07  3:30     ` Eric Dumazet
2022-02-07  3:30       ` Eric Dumazet
2022-01-24 20:24 ` [PATCH net-next 4/6] ipv4: do not use per netns icmp sockets Eric Dumazet
2022-01-24 20:24 ` [PATCH net-next 5/6] ipv6: " Eric Dumazet
2022-01-24 20:24 ` [PATCH net-next 6/6] ipv4/tcp: do not use per netns ctl sockets Eric Dumazet
2022-01-26 16:14   ` Paolo Abeni
2022-01-26 16:24     ` Eric Dumazet
2022-01-26 16:35       ` Paolo Abeni
2022-01-26 18:02         ` Eric Dumazet
2022-01-25 18:02 ` [PATCH net-next 0/6] netns: speedup netns dismantles Jakub Kicinski

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.