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)
Sat, Oct 18, 7:55 PM
Unknown Object (File)
Sat, Oct 18, 7:38 PM
Unknown Object (File)
Sun, Oct 12, 4:47 PM
Unknown Object (File)
Sun, Oct 12, 4:47 PM
Unknown Object (File)
Sun, Oct 5, 4:24 AM
Unknown Object (File)
Wed, Sep 24, 2:35 AM
Unknown Object (File)
Wed, Sep 24, 12:27 AM
Unknown Object (File)
Tue, Sep 23, 8:53 PM

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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31093
Build 28784: arc lint + arc unit