]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: x_tables: don't use seqlock when fetching old counters
authorFlorian Westphal <fw@strlen.de>
Wed, 11 Oct 2017 23:13:51 +0000 (01:13 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Oct 2017 16:01:50 +0000 (18:01 +0200)
commitb1a7c35f92032c7be75b5897bcf5aa333d260c78
treec0387e21f2af12e91f485ac0c944cefab9359a2a
parent1e6d83d058ffb5d6b5abb777d9b4cc4f01319a24
netfilter: x_tables: don't use seqlock when fetching old counters

after previous commit xt_replace_table will wait until all cpus
had even seqcount (i.e., no cpu is accessing old ruleset).

Add a 'old' counter retrival version that doesn't synchronize counters.
Its not needed, the old counters are not in use anymore at this point.

This speeds up table replacement on busy systems with large tables
(and many cores).

Cc: Dan Williams <dcbw@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c