1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-20 15:43:16 +00:00
freebsd/sys/netpfil/pf
Kristof Provost 4fc65bcbe3 pfsync: Performance improvement
pfsync code is called for every new state, state update and state
deletion in pf. While pf itself can operate on multiple states at the
same time (on different cores, assuming the states hash to a different
hashrow), pfsync only had a single lock.
This greatly reduced throughput on multicore systems.

Address this by splitting the pfsync queues into buckets, based on the
state id. This ensures that updates for a given connection always end up
in the same bucket, which allows pfsync to still collapse multiple
updates into one, while allowing multiple cores to proceed at the same
time.

The number of buckets is tunable, but defaults to 2 x number of cpus.
Benchmarking has shown improvement, depending on hardware and setup, from ~30%
to ~100%.

MFC after:	1 week
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D18373
2018-12-06 19:27:15 +00:00
..
if_pflog.c
if_pfsync.c pfsync: Performance improvement 2018-12-06 19:27:15 +00:00
in4_cksum.c
pf_altq.h
pf_if.c pf: Fix panic on overlapping interface names 2018-12-01 09:58:21 +00:00
pf_ioctl.c pfsync: Handle syncdev going away 2018-11-02 16:57:23 +00:00
pf_lb.c pf: add a comment describing why do we call pf_map_addr again if port 2018-12-06 18:58:54 +00:00
pf_mtag.h
pf_norm.c pf: Fix build if INVARIANTS is not set 2018-11-02 19:23:50 +00:00
pf_osfp.c
pf_ruleset.c
pf_table.c pf: Prevent tables referenced by rules in anchors from getting disabled. 2018-11-08 21:54:40 +00:00
pf.c
pf.h