diff options
author | David S. Miller <davem@davemloft.net> | 2022-01-25 11:25:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-01-25 11:25:22 +0000 |
commit | 51d555cfdcc60436850f75daa6e379ba08e7a68c (patch) | |
tree | f989ea5f702b3dadd7d38739768d443129534913 /net/ipv6/tcp_ipv6.c | |
parent | 8a0de61c40af634ce08458ae088b40c1103ee1ad (diff) | |
parent | 37ba017dcc3b1123206808979834655ddcf93251 (diff) |
Merge branch 'netns-speedup-dismantle'
Eric Dumazet says:
====================
netns: speedup netns dismantles
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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 075ee8a2df3b..1e55ee98dfed 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -2237,15 +2237,9 @@ static void __net_exit tcpv6_net_exit(struct net *net) inet_ctl_sock_destroy(net->ipv6.tcp_sk); } -static void __net_exit tcpv6_net_exit_batch(struct list_head *net_exit_list) -{ - inet_twsk_purge(&tcp_hashinfo, AF_INET6); -} - static struct pernet_operations tcpv6_net_ops = { .init = tcpv6_net_init, .exit = tcpv6_net_exit, - .exit_batch = tcpv6_net_exit_batch, }; int __init tcpv6_init(void) |