Repository navigation
release (optional): take shared tables once per burst - #1988
Draft
daniel-noland wants to merge 1 commit into
Draft
daniel-noland wants to merge 1 commit into
daniel-noland wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
daniel-noland
changed the base branch from
main
to
pr/daniel-noland/release-advised
October 27, 2026 01:24
daniel-noland
force-pushed
the
pr/daniel-noland/tables-once-per-burst
branch
from
October 27, 2026 01:24
dea1615 to
eaf886a
Compare
Collaborator
Author
daniel-noland
force-pushed
the
pr/daniel-noland/release-advised
branch
from
October 27, 2026 01:40
543c3de to
674766b
Compare
daniel-noland
force-pushed
the
pr/daniel-noland/tables-once-per-burst
branch
from
October 27, 2026 01:40
eaf886a to
c476cef
Compare
daniel-noland
force-pushed
the
pr/daniel-noland/release-advised
branch
from
October 27, 2026 01:41
674766b to
ae4bfde
Compare
daniel-noland
force-pushed
the
pr/daniel-noland/tables-once-per-burst
branch
from
October 27, 2026 01:41
c476cef to
78aea22
Compare
daniel-noland
force-pushed
the
pr/daniel-noland/release-advised
branch
2 times, most recently
from
October 27, 2026 07:03
3546d2c to
6c7ca8b
Compare
daniel-noland
force-pushed
the
pr/daniel-noland/tables-once-per-burst
branch
from
October 27, 2026 16:03
78aea22 to
4ab9d49
Compare
…ce per burst A worker ran about 34 locked instructions per packet, each a full barrier on x86. Many were stages taking shared, rarely changing state once per packet rather than once per burst: - egress and ingress entered the interface table, and egress the adjacency table, for every packet. Entering a left-right reader is an atomic RMW and a fence on the way in, and another RMW on the way out. - the FIB memo cached a reader per burst but entered it per packet. - the ACL filter loaded its tables, an `Arc` reference both ways, per packet. - the flow filter cloned the packet's flow into its summary. Egress, ingress and the ACL filter now take their tables once per burst. The FIB memo holds each reader it caches entered (`FibPin`), so entering it per packet takes left-right's nested, thread-local path. The flow filter copies what it needs from the flow instead of holding it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
daniel-noland
force-pushed
the
pr/daniel-noland/tables-once-per-burst
branch
from
October 27, 2026 17:14
4ab9d49 to
b8727d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The optional set for this release: stacked on #2004 (advised), which stacks on #2003 (required). Rebased onto #2004 on 2026-10-27; the rustfmt failure from the earlier CI run is fixed in the commit. The measurements below were taken on the env-5 bench branch, not on this stack.
Counting
ls_locks.allon the env-5 gateway showed about 34.5 locked instructions per packet on a DPDK worker, at every flow count. Each is a full barrier on x86 (on the order of 20 cycles on Zen 5), and it keeps later loads from running ahead. Most of them came from stages taking shared, rarely-changing state once per packet instead of once per burst:left-rightreader costs an atomic RMW and aSeqCstfence on the way in, and another RMW on the way out.Arc, which is an atomic increment and decrement.Arc<FlowInfo>) into its summary.What changed:
routing::FibPin. Entering it again for each packet then takes left-right's nested, thread-local path.A writer now waits for at most one burst before readers leave.
Measurement
Measured on env-5 gateway-bm: EPYC 9555P, 8 DPDK workers, masquerade, 64 B frames, Mpps for the whole gateway. The bench build carries other flow-table work, so main's absolute numbers will differ.
That is +12-17 %, with instructions per packet almost unchanged (−1.5 %). Removing about 24 locked ops per packet saved about 420 cycles.
Review notes
FibPinholds a left-rightReadGuardwith its lifetime extended to'static, next to theRc<FibReader>it borrows from. The guard field is declared first, so it is dropped first, and the guard is never handed out. This is the onlyunsafehere; aself_cell-style crate would avoid it if preferred.routing::cli::handler::tests_cli_handling::test_cli_handlingfailed once in a full parallel run and passed alone. It also fails alone on main plus an unrelated change, so it looks timing-sensitive and unrelated to this PR.🤖 Generated with Claude Code