docs(audits): ReorderBuffer cache behavior static analysis (#1854)#3707
Merged
Conversation
Static-analysis half of #1854: predicts cache-line residency, branch behavior, and working-set size of BoundedReorderBuffer at 100K, 1M, and 10M items. Compares the BTreeMap-backed buffer with the ring-based alternative already shipped in engine::concurrent_delta::ReorderBuffer (#1734) and lists the perf counters and decision criteria the runtime half must capture.
4fada69 to
67abfc8
Compare
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…3707) Static-analysis half of #1854: predicts cache-line residency, branch behavior, and working-set size of BoundedReorderBuffer at 100K, 1M, and 10M items. Compares the BTreeMap-backed buffer with the ring-based alternative already shipped in engine::concurrent_delta::ReorderBuffer (#1734) and lists the perf counters and decision criteria the runtime half must capture.
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.
Summary
docs/audits/reorderbuffer-cache-behavior-static.md(513 lines), the static-analysis half of Add amd64 tarball artifact and guard packaging alternatives #1854.BoundedReorderBuffer<T>at file-list scales of 100K, 1M, and 10M, derived from theBTreeMap<u64, T>shape and the insert/drain cycle incrates/transfer/src/reorder_buffer.rs.BTreeMapform with theVecDeque + indexalternative from Improve CLI binary lookup for tests #1853 and reconciles with the ring-basedengine::concurrent_delta::ReorderBufferalready shipped under Add zlib accessor tests to improve coverage #1734.perf stat,cachegrind,perf c2c, and FlameGraph invocations the runtime half of Add amd64 tarball artifact and guard packaging alternatives #1854 must capture, plus the four decision criteria that justify migrating to the ring form.docs/design/reorderbuffer-metrics-and-bypass.md) for the metrics-counter hooks the runtime side reuses.Headline finding
At the default window of 64 the buffer's working set is bounded by
W * sizeof(T)plus a singleBTreeMapleaf, regardless of file-list length. Saturated working set is roughly 4.8 KiB - L1 resident on every shipping x86_64 and aarch64 part.Ndoes not enter the cache analysis.Test plan
markdownlintclean on the new doc