]> git.karo-electronics.de Git - linux-beck.git/commit
netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()
authorEric Dumazet <dada1@cosmosbay.com>
Wed, 25 Mar 2009 20:05:46 +0000 (21:05 +0100)
committerPatrick McHardy <kaber@trash.net>
Wed, 25 Mar 2009 20:05:46 +0000 (21:05 +0100)
commitea781f197d6a835cbb93a0bf88ee1696296ed8aa
tree820fe7df1199d8bb6c793e664e480ea56ecf612e
parent1f9352ae2253a97b07b34dcf16ffa3b4ca12c558
netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()

Use "hlist_nulls" infrastructure we added in 2.6.29 for RCUification of UDP & TCP.

This permits an easy conversion from call_rcu() based hash lists to a
SLAB_DESTROY_BY_RCU one.

Avoiding call_rcu() delay at nf_conn freeing time has numerous gains.

First, it doesnt fill RCU queues (up to 10000 elements per cpu).
This reduces OOM possibility, if queued elements are not taken into account
This reduces latency problems when RCU queue size hits hilimit and triggers
emergency mode.

- It allows fast reuse of just freed elements, permitting better use of
CPU cache.

- We delete rcu_head from "struct nf_conn", shrinking size of this structure
by 8 or 16 bytes.

This patch only takes care of "struct nf_conn".
call_rcu() is still used for less critical conntrack parts, that may
be converted later if necessary.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/net/netfilter/nf_conntrack.h
include/net/netfilter/nf_conntrack_tuple.h
include/net/netns/conntrack.h
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
net/ipv4/netfilter/nf_nat_core.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_standalone.c
net/netfilter/xt_connlimit.c