aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netns
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-01-24 12:24:56 -0800
committerDavid S. Miller <davem@davemloft.net>2022-01-25 11:25:21 +0000
commit6a17b961ec19cd61ca646a6655ab93e8f6fe15c0 (patch)
tree9fcdc5edd6e0f9cd99760ba2ebb46dc154c0cd94 /include/net/netns
parentipv4: do not use per netns icmp sockets (diff)
downloadlinux-dev-6a17b961ec19cd61ca646a6655ab93e8f6fe15c0.tar.xz
linux-dev-6a17b961ec19cd61ca646a6655ab93e8f6fe15c0.zip
ipv6: do not use per netns icmp sockets
Back in linux-2.6.25 (commit 98c6d1b261e7 "[NETNS]: Make icmpv6_sk per namespace.", we added private per-cpu/per-netns ipv6 icmp sockets. This adds memory and cpu costs, which do not seem needed. Now typical servers have 256 or more cores, this adds considerable tax to netns users. icmp sockets are used from BH context, are not receiving packets, and do not store any persistent state but the 'struct net' pointer. icmpv6_xmit_lock() already makes sure to lock the chosen per-cpu socket. This patch has a considerable impact on the number of netns that the worker thread in cleanup_net() can dismantle per second, because ip6mr_sk_done() is no longer called, meaning we no longer acquire the rtnl mutex, competing with other threads adding new netns. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns')
-rw-r--r--include/net/netns/ipv6.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index a4b550380316..30cdfc4e1615 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -88,7 +88,6 @@ struct netns_ipv6 {
struct fib6_table *fib6_local_tbl;
struct fib_rules_ops *fib6_rules_ops;
#endif
- struct sock * __percpu *icmp_sk;
struct sock *ndisc_sk;
struct sock *tcp_sk;
struct sock *igmp_sk;