netfilter: xtables: stackptr should be percpu
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 31 May 2010 14:41:35 +0000 (16:41 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 31 May 2010 14:41:35 +0000 (16:41 +0200)
commit7489aec8eed4f2f1eb3b4d35763bd3ea30b32ef5
treefe2450679dc217183421e606b3912641545596bd
parentc936e8bd1de2fa50c49e3df6fa5036bf07870b67
netfilter: xtables: stackptr should be percpu

commit f3c5c1bfd4 (netfilter: xtables: make ip_tables reentrant)
introduced a performance regression, because stackptr array is shared by
all cpus, adding cache line ping pongs. (16 cpus share a 64 bytes cache
line)

Fix this using alloc_percpu()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-By: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter/x_tables.h
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/x_tables.c