]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: reduce percpu needs for icmpv6msg mibs
authorEric Dumazet <eric.dumazet@gmail.com>
Sun, 13 Nov 2011 01:24:04 +0000 (01:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Nov 2011 05:12:26 +0000 (00:12 -0500)
commitd384749c56717ea7027d94d88c7b107ced8cb212
treeef283db22c931c518ac6c0b8bca2e23dd62a7736
parentc4c5d58badd6e0200d051855210bb0f24b24f9fc
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>
include/net/ipv6.h
include/net/netns/mib.h
include/net/snmp.h
net/ipv6/af_inet6.c
net/ipv6/proc.c