freebsd-dev/sys/net
Mateusz Guzik f92c21a28c pf: depessimize table handling
Creating tables and zeroing their counters induces excessive IPIs (14
per table), which in turns kills single- and multi-threaded performance.

Work around the problem by extending per-CPU counters with a general
counter populated on "zeroing" requests -- it stores the currently found
sum. Then requests to report the current value are the sum of per-CPU
counters subtracted by the saved value.

Sample timings when loading a config with 100k tables on a 104-way box:

stock:

pfctl -f tables100000.conf  0.39s user 69.37s system 99% cpu 1:09.76 total
pfctl -f tables100000.conf  0.40s user 68.14s system 99% cpu 1:08.54 total

patched:

pfctl -f tables100000.conf  0.35s user 6.41s system 99% cpu 6.771 total
pfctl -f tables100000.conf  0.48s user 6.47s system 99% cpu 6.949 total

Reviewed by:	kp (previous version)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-07-05 10:42:01 +02:00
..
altq altq: Increase maximum number of CBQ and HFSC classes 2021-03-04 20:58:22 +01:00
route Fix panic when trying to delete non-existent gateway in multipath route. 2021-05-07 20:41:31 +00:00
bpf_buffer.c
bpf_buffer.h
bpf_filter.c
bpf_jitter.c
bpf_jitter.h
bpf_zerocopy.c
bpf_zerocopy.h
bpf.c net/bpf: Fix writing of buffer bigger than PAGESIZE 2021-06-23 10:39:18 -06:00
bpf.h
bpfdesc.h
bridgestp.c bridgestp: validate timer values in config BPDU 2021-04-19 12:09:18 +02:00
bridgestp.h
debugnet_inet.c
debugnet_int.h
debugnet.c Allow to specify debugnet fib in sysctl/tunable. 2021-04-10 13:47:49 +00:00
debugnet.h
dlt.h
ethernet.h ifconfig: Minor documentation fix 2021-05-03 14:38:52 +03:00
firewire.h
ieee8023ad_lacp.c
ieee8023ad_lacp.h
ieee_oui.h
if_arp.h
if_bridge.c bridge: Remove members when assigned to a new vnet 2021-02-23 13:54:07 +01:00
if_bridgevar.h
if_clone.c
if_clone.h
if_dead.c
if_debug.c
if_disc.c
if_dl.h
if_edsc.c
if_enc.c
if_enc.h
if_epair.c
if_ethersubr.c kern: ether_gen_addr: randomize on default hostuuid, too 2021-06-01 22:59:21 -05:00
if_fwsubr.c if_firewire: fixing panic upon packet reception for VNET build 2021-04-13 22:59:58 +00:00
if_gif.c mbuf: add a way to mark flowid as calculated from the internal headers 2021-03-31 14:38:26 +03:00
if_gif.h
if_gre.c
if_gre.h
if_infiniband.c
if_ipsec.c
if_ipsec.h
if_lagg.c
if_lagg.h
if_llatbl.c Fix setting static entries for arp/ndp. 2021-02-20 18:26:35 +00:00
if_llatbl.h
if_llc.h
if_loop.c
if_me.c
if_media.c
if_media.h
if_mib.c
if_mib.h
if_pflog.h
if_pfsync.h pfsync: Expose PFSYNCF_OK flag to userspace 2021-04-26 14:31:17 +02:00
if_sppp.h
if_spppfr.c
if_spppsubr.c
if_stf.c net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros 2021-03-04 20:56:48 +01:00
if_tap.h
if_tun.h
if_tuntap.c
if_types.h base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
if_var.h Enforce check for using the return result for ifa?_try_ref(). 2021-04-05 03:35:19 +01:00
if_vlan_var.h
if_vlan.c Retore the vnet before returning an error. 2021-06-21 10:46:20 -04:00
if_vxlan.c Make LINT NOINET and NOIP kernel builds warning free. 2021-06-06 14:03:06 +00:00
if_vxlan.h
if.c devctl: add RENAME devctl event for IFNET 2021-06-23 10:20:58 -06:00
if.h Use thunks for compat ioctls using struct ifgroupreq. 2021-05-05 13:59:00 -07:00
ifdi_if.m iflib: add support for admin completion queues 2021-03-03 00:40:47 +01:00
iflib_clone.c iflib: allow clone detach if not yet init 2021-03-09 13:49:13 -06:00
iflib_private.h
iflib.c iflib: switch bare zone_mbuf use to m_free_raw 2021-07-02 08:30:22 +00:00
iflib.h iflib: Add a new quirk 2021-06-24 13:00:56 +02:00
ifq.h
infiniband.h
mp_ring.c
mp_ring.h
mppc.h
mppcc.c
mppcd.c
netisr_internal.h
netisr.c
netisr.h
netmap_legacy.h netmap: add kernel support for the "offsets" feature 2021-03-29 16:29:01 +00:00
netmap_user.h netmap: restore commit a56e6334d1 2021-04-02 10:45:47 +00:00
netmap_virt.h netmap: add kernel support for the "offsets" feature 2021-03-29 16:29:01 +00:00
netmap.h netmap: several typo fixes 2021-04-02 07:01:20 +00:00
paravirt.h
pfil.c
pfil.h
pfkeyv2.h
pfvar.h pf: depessimize table handling 2021-07-05 10:42:01 +02:00
ppp_defs.h
radix.c Appease -Wsign-compare in radix.c 2021-04-10 13:48:25 +00:00
radix.h
raw_cb.c
raw_cb.h
raw_usrreq.c
rndis.h Hyper-V: hn: Enable vSwitch RSC support in hn netvsc driver 2021-03-12 04:35:16 +00:00
route.c devctl: add ADDR_ADD and ADDR_DEL devctl event for IFNET 2021-06-23 10:26:56 -06:00
route.h Re-enable network ioctls in capability mode 2021-04-23 09:22:49 -04:00
rss_config.c
rss_config.h
rtsock.c Make LINT NOINET and NOIP kernel builds warning free. 2021-06-06 14:03:06 +00:00
sff8436.h
sff8472.h
slcompress.c
slcompress.h
toeplitz.c
toeplitz.h
vnet.c
vnet.h