diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-11-13 01:24:04 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-14 05:12:26 (GMT) |
commit | 2a24444f8f2bea694003e3eac5c2f8d9a386bdc5 (patch) | |
tree | ef283db22c931c518ac6c0b8bca2e23dd62a7736 /include/net/netns/mib.h | |
parent | 3d249d4ca7d0ed6629a135ea1ea21c72286c0d80 (diff) | |
download | linux-fsl-qoriq-2a24444f8f2bea694003e3eac5c2f8d9a386bdc5.tar.xz |
ipv6: reduce percpu needs for icmpv6msg mibs
Reading /proc/net/snmp6 on a machine with a lot of cpus is very
expensive (can be ~88000 us).
This is because ICMPV6MSG MIB uses 4096 bytes per cpu, and folding
values for all possible cpus can read 16 Mbytes of memory (32MBytes on
non x86 arches)
ICMP messages are not considered as fast path on a typical server, and
eventually few cpus handle them anyway. We can afford an atomic
operation instead of using percpu data.
This saves 4096 bytes per cpu and per network namespace.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns/mib.h')
-rw-r--r-- | include/net/netns/mib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h index f360135..30f6728 100644 --- a/include/net/netns/mib.h +++ b/include/net/netns/mib.h @@ -18,7 +18,7 @@ struct netns_mib { DEFINE_SNMP_STAT(struct udp_mib, udplite_stats_in6); DEFINE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); - DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); + DEFINE_SNMP_STAT_ATOMIC(struct icmpv6msg_mib, icmpv6msg_statistics); #endif #ifdef CONFIG_XFRM_STATISTICS DEFINE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics); |