• Eric Dumazet's avatar
    ipv6: reduce per device ICMP mib sizes · be281e55
    Eric Dumazet authored
    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: default avatarEric Dumazet <eric.dumazet@gmail.com>
    CC: Denys Fedoryshchenko <denys@visp.net.lb>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    be281e55
ipv6.h 18.8 KB