https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230619

Kristof Provost <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Kristof Provost <[email protected]> ---
It's a tradeoff. pfr_update_stats() is currently called without any relevant
locks held, so there's a risk of both a memory leak and incorrect counting.
Using PCPU counters (and always allocating them) mitigates this.

One alternative would be to take the rules lock, which is usually used to
protect tables, but we'd have to take it for writing, to ensure no other
threads are updating the counters at the same time, which I would expect to be
devastating for throughput.

We might be able to get away with a per-table (but there are throughput
concerns for that too), or even per pfr_kentry lock, but the locking structure
of pf is already complex, and I'm not immediately clear on how it would
interact with the rest of the locking.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "[email protected]"

Reply via email to