Date: Wed, 15 Aug 2018 10:06:29 +0000 From: bugzilla-noreply@freebsd.org To: pf@FreeBSD.org Subject: [Bug 230619] pf: tables use non SMP-friendly counters Message-ID: <bug-230619-16861-mJEhINpaeE@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-230619-16861@https.bugs.freebsd.org/bugzilla/> References: <bug-230619-16861@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230619 Kristof Provost <kp@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kp@freebsd.org --- Comment #2 from Kristof Provost <kp@freebsd.org> --- 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 struct= ure of pf is already complex, and I'm not immediately clear on how it would interact with the rest of the locking. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230619-16861-mJEhINpaeE>