• Eric Dumazet's avatar
    [NETFILTER] ip_tables: NUMA-aware allocation · 31836064
    Eric Dumazet authored
    Part of a performance problem with ip_tables is that memory allocation
    is not NUMA aware, but 'only' SMP aware (ie each CPU normally touch
    separate cache lines)
    
    Even with small iptables rules, the cost of this misplacement can be
    high on common workloads.  Instead of using one vmalloc() area
    (located in the node of the iptables process), we now allocate an area
    for each possible CPU, using vmalloc_node() so that memory should be
    allocated in the CPU's node if possible.
    
    Port to arp_tables and ip6_tables by Harald Welte.
    Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    31836064
ip_tables.c 48.3 KB