• Eric Dumazet's avatar
    ipv4: reduce percpu needs for icmpmsg mibs · acb32ba3
    Eric Dumazet authored
    Reading /proc/net/snmp on a machine with a lot of cpus is very expensive
    (can be ~88000 us).
    
    This is because ICMPMSG MIB uses 4096 bytes per cpu, and folding values
    for all possible cpus can read 16 Mbytes of memory.
    
    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: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    acb32ba3
mib.h 968 Bytes