]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER] ip_tables: NUMA-aware allocation
authorEric Dumazet <dada1@cosmosbay.com>
Wed, 14 Dec 2005 07:13:48 +0000 (23:13 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 3 Jan 2006 21:10:29 +0000 (13:10 -0800)
commit91c6e28b1fe02e66aa55063ba10cbac5d0b8e797
tree26ab4ddc68f917dd4e8813ace504956620eba3a8
parenta8f6bb5b257d3b483178635539f5f2766bf88050
[NETFILTER] ip_tables: NUMA-aware allocation

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: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c