]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: reduce per device ICMP mib sizes
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 19 May 2011 01:14:23 +0000 (01:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 May 2011 20:21:22 +0000 (16:21 -0400)
commit25f4277850751368725852cd2bdc12fef9dda224
tree7e80e5eb0aa76efcdb39a06413ff9e0ae73de35a
parent8c0f1bfb422d46829b90d3b147043cec36e3ac56
ipv6: reduce per device ICMP mib sizes

ipv6 has per device ICMP SNMP counters, taking too much space because
they use percpu storage.

needed size per device is :
(512+4)*sizeof(long)*number_of_possible_cpus*2

On a 32bit kernel, 16 possible cpus, this wastes more than 64kbytes of
memory per ipv6 enabled network device, taken in vmalloc pool.

Since ICMP messages are rare, just use shared counters (atomic_long_t)

Per network space ICMP counters are still using percpu memory, we might
also convert them to shared counters in a future patch.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/if_inet6.h
include/net/ipv6.h
include/net/snmp.h
net/ipv6/addrconf.c
net/ipv6/proc.c