aha/net/ipv6/netfilter
Stephen Hemminger 784544739a netfilter: iptables: lock free counters
The reader/writer lock in ip_tables is acquired in the critical path of
processing packets and is one of the reasons just loading iptables can cause
a 20% performance loss. The rwlock serves two functions:

1) it prevents changes to table state (xt_replace) while table is in use.
   This is now handled by doing rcu on the xt_table. When table is
   replaced, the new table(s) are put in and the old one table(s) are freed
   after RCU period.

2) it provides synchronization when accesing the counter values.
   This is now handled by swapping in new table_info entries for each cpu
   then summing the old values, and putting the result back onto one
   cpu.  On a busy system it may cause sampling to occur at different
   times on each cpu, but no packet/byte counts are lost in the process.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Sucessfully tested on my dual quad core machine too, but iptables only (no ipv6 here)
BTW, my new "tbench 8" result is 2450 MB/s, (it was 2150 MB/s not so long ago)

Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-02-20 10:35:32 +01:00
..
ip6_queue.c netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
ip6_tables.c netfilter: iptables: lock free counters 2009-02-20 10:35:32 +01:00
ip6t_ah.c netfilter: xtables: move extension arguments into compound structure (2/6) 2008-10-08 11:35:18 +02:00
ip6t_eui64.c netfilter: xtables: move extension arguments into compound structure (1/6) 2008-10-08 11:35:18 +02:00
ip6t_frag.c netfilter: xtables: move extension arguments into compound structure (2/6) 2008-10-08 11:35:18 +02:00
ip6t_hbh.c netfilter: xtables: move extension arguments into compound structure (2/6) 2008-10-08 11:35:18 +02:00
ip6t_ipv6header.c netfilter: xtables: move extension arguments into compound structure (2/6) 2008-10-08 11:35:18 +02:00
ip6t_LOG.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2008-12-28 12:49:40 -08:00
ip6t_mh.c netfilter: xtables: move extension arguments into compound structure (2/6) 2008-10-08 11:35:18 +02:00
ip6t_REJECT.c netns xfrm: lookup in netns 2008-11-25 17:35:18 -08:00
ip6t_rt.c netfilter: xtables: move extension arguments into compound structure (2/6) 2008-10-08 11:35:18 +02:00
ip6table_filter.c netfilter: x_tables: remove unneeded initializations 2009-02-18 16:30:20 +01:00
ip6table_mangle.c netfilter: x_tables: remove unneeded initializations 2009-02-18 16:30:20 +01:00
ip6table_raw.c netfilter: x_tables: remove unneeded initializations 2009-02-18 16:30:20 +01:00
ip6table_security.c netfilter: x_tables: remove unneeded initializations 2009-02-18 16:30:20 +01:00
Kconfig netfilter: xtables: add backward-compat options 2009-02-19 11:16:03 +01:00
Makefile netfilter: Combine ipt_ttl and ip6t_hl source 2009-02-18 18:39:31 +01:00
nf_conntrack_l3proto_ipv6.c net: replace %p6 with %pI6 2008-10-29 12:52:50 -07:00
nf_conntrack_proto_icmpv6.c netfilter: log invalid new icmpv6 packet with nf_log_packet() 2009-02-18 16:30:56 +01:00
nf_conntrack_reasm.c net: '&' redux 2008-11-03 18:21:05 -08:00