Repository navigation
perf(net): skip empty cache deadline clock reads - #6291
Conversation
Quest-Claim: 3a1cc0ceaf501d06
Co-Authored-By: GPT-6 <noreply@openai.com>
Main added a frame budget argument while this branch was open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The remaining ~8 ns over release pays for wall-clock aging (#5548). An earliest-deadline atomic cannot prove a replacement driver is registered, and a new notification primitive is not worth ~8 ns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # quest/m1/release-perf/README.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Idle track GC pays for an ambient clock read and an atomic read-modify-write on every poll even when no wall deadline exists. The benchmark also constructed a fresh waiter every iteration, charging allocation work that real drivers reuse. Found by the release perf epic (
track_gc/idle11.6 ns on release vs 73.7 ns on main).Approach
Reuse benchmark waiters and add advancing-time cases. Skip the wall clock when the deadline index is empty. Keep one effective wall sample per nonempty release pass, and replace
wall_micros.fetch_maxwith a store under the existing clock mutex, which already clamps every writer's supplied time. Preserve replacement-driver registration, callback lock boundaries, and max(wall, pts) aging.Current consumers are origin drivers and standalone cache-pool drivers.
The remaining ~8 ns over release is accepted and recorded in the epic's comparison table: it is the lock and driver registration that wall-clock aging (moq-dev/moq#5548) needs. This PR retires the Idle GC quest with
quest rm.Impact
Validation
just rs check-test -p moq-netafter merging main: 3,004 passed, 11 skipped. Deterministic tests cover replacement-driver rearming and ambient, supplied-future, and backward time.just check: Rust lint, quest (574 documents), and drill checks passed. The flake VM-image check fails on this host withunshare: write failed /proc/self/uid_map: Operation not permitted, unrelated to this change.Advancing-input idle cases move from 36.7-37.5 ns to 19.7-19.8 ns. Small sweep differences are reported rather than treated as improvements on this shared host.
Alternatives
An earliest-deadline atomic alone cannot prove that a replacement waiter is registered. Comparing only supplied time also misses ambient time reaching a parked deadline. Neither shortcut is used. A reusable lock-free notification primitive could remove the last ~8 ns, but is not worth its cost.
Follow-ups
None.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code