Page MenuHomeFreeBSD

pf: Add a new zone for per-table entry counters.
ClosedPublic

Authored by markj on May 14 2020, 7:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 20, 3:32 PM
Unknown Object (File)
Thu, Nov 20, 3:31 PM
Unknown Object (File)
Thu, Nov 20, 3:31 PM
Unknown Object (File)
Thu, Nov 20, 3:30 PM
Unknown Object (File)
Thu, Nov 20, 3:22 PM
Unknown Object (File)
Sun, Nov 16, 4:02 PM
Unknown Object (File)
Mon, Nov 10, 4:28 AM
Unknown Object (File)
Tue, Nov 4, 9:35 AM

Details

Summary

Right now we allocate 2*PFR_OP_ADDR_MAX*OP_DIR_MAX counters per table
entry, which itself requires 8 pointers. We can instead define a zone
which returns arrays of 8 per-CPU counters, so the table entry structure
only needs to store one pointer.

On amd64 this reduces sizeof(pfr_kentry) from 216 to 160. The smaller
size also gets us better slab efficiency (i.e., there is less internal
fragmentation): we can pack 25 structures in a page instead of 18.
vm.uma.pf_table_entries.keg.efficiency goes from 94% to 97%.

Test Plan

pf regression tests pass

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable