Messages in this thread | | | Date | Fri, 11 Jan 2019 09:34:11 +0100 | From | Peter Zijlstra <> | Subject | Re: seqcount usage in xt_replace_table() |
| |
On Thu, Jan 10, 2019 at 11:29:20PM +0100, Florian Westphal wrote: > Peter Zijlstra <peterz@infradead.org> wrote: > > Would using synchronize_rcu() not also mean you can get rid of that > > xt_write_recseq*() stuff entirely? > > No, because those are used to synchronize with cpus that read > the ruleset counters, see > > net/ipv4/netfilter/ip_tables.c:get_counters().
Ah, bummer :/
> > Anyway, synchronize_rcu() can also take a little while, but I don't > > think anywere near 30 seconds. > > Ok, I think in that case it would be best to just replace the > recseq value sampling with smp_mb + synchronize_rcu plus a comment > that explains why its done.
synchronize_rcu() implies smp_mb() on all CPUs.
| |