Repository navigation
perf(moq-net): an idle track read parks again without walking the read path #7263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7e31b3e
chore(quest): claim quest/m1/idle-poll-exit.md
kixelated 3b612d2
docs(quest): checkpoint idle poll profiling at build admission
kixelated 1b53174
Merge origin/main
kixelated 363e255
perf(moq-net): answer a repeated idle group read without the walk
kixelated 3fefde6
perf(moq-net): park a repeated idle read ahead of the subscriber's meter
kixelated bfc2580
perf(moq-net): count only what a peek skipped on a repeated idle read
kixelated 2f3219d
test(moq-net): cover the idle read gate and bench repeated parks over…
kixelated 2f43069
Merge origin/main
kixelated 0ecdc8d
chore(quest): retire the idle poll exit quest
kixelated 60789e2
fix(moq-net): retire the idle gate's waiter as a task's park would
kixelated f15c3d9
Merge origin/main
kixelated 8ad758f
quest: plan follow-ups from the idle poll exit
kixelated d8d7804
Merge origin/main into quest/m1/idle-poll-exit
kixelated 805b7a4
quest land: merge tested base
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # [XS] The paired bench baseline builds | ||
|
|
||
| ## Goal | ||
|
|
||
| The scheduled Nightly's paired bench jobs build their baseline and get to the | ||
| comparison. Check with `gh run list --workflow nightly.yml --event schedule` | ||
| and the "Rust bench targets" step of the newest run (the other paired jobs, | ||
| such as "io_uring benchmarks", share the cause). Once a scheduled run gets past | ||
| the base build, delete this quest. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-11-01 (maintainer, `/quest-plan`): a wait-and-check quest that | ||
| stays ready, since #7245 likely fixed it already and only the next scheduled | ||
| run can tell. | ||
|
|
||
| Scheduled run | ||
| [41204380716](https://github.com/moq-dev/moq/actions/runs/41204380716) | ||
| (2026-10-31) failed every paired bench job before comparing: `bench/run.sh` | ||
| checks the baseline out to `$RUN/base`, under `target/bench/nightly/` inside | ||
| the main checkout, and Cargo could not merge that checkout's | ||
| `.cargo/config.toml` `build-ffi` alias with the current one ("failed to merge | ||
| key `build-ffi`"). | ||
|
|
||
| That run's head already had | ||
| [moq-dev/moq#7245](https://github.com/moq-dev/moq/pull/7245), which makes the | ||
| aliases strings, so a nested checkout's alias overrides instead of merging. | ||
| Its baseline (`previous-nightly`) predated #7245 and still had the list form. | ||
| The next scheduled run's baseline includes #7245, so it should build. | ||
|
|
||
| If it still fails on the merge, build the baseline outside the checkout (a | ||
| `git worktree` beside the repository instead of under `target/`), so no | ||
| enclosing `.cargo/config.toml` applies. | ||
|
|
||
| Found by [moq-dev/moq#7253](https://github.com/moq-dev/moq/pull/7253). |
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
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # [S] Adapter reads reuse their waker | ||
|
|
||
| ## Goal | ||
|
|
||
| A measured verdict on what a parking read costs in the production adapters | ||
| (moq-tokio, moq-uring) since | ||
| [moq-dev/moq#7042](https://github.com/moq-dev/moq/pull/7042), and a fix if | ||
| the cost is real: a stream read that has to wait stops allocating a fresh | ||
| shared waker each time. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-11-01 (maintainer, `/quest-plan`): measure before fixing, since | ||
| no bench has shown the cost yet. | ||
|
|
||
| Since #7042, transport polls take a `kio::Waiter` through `&self`, and every | ||
| `kio::wait` future (`rs/kio/src/waiter.rs`) holds a waiter of its own. The | ||
| moq-net coding layer (`rs/moq-net/src/coding/reader.rs`, `writer.rs`) wraps | ||
| each decode or flush in one, so a read that parks allocates the waiter's | ||
| shared `Arc<Waker>` every time, where a per-stream `kio::Park` used to reuse | ||
| one. | ||
|
|
||
| [moq-dev/moq#7262](https://github.com/moq-dev/moq/pull/7262) fixed the | ||
| in-memory transport's version (it registered on the session close per read). | ||
| The memory-transport benches rarely park, so they cannot see the adapters' | ||
| cost. | ||
|
|
||
| Measure first: user-space instruction counts and allocations, pinned to one | ||
| core, on moq-uring's `session_lite` bench (`just rs bench-session`) and, for | ||
| moq-tokio, which has no crate-level session bench, the relay's | ||
| `rs/moq-relay/benches/session.rs` or `just bench BASE`. Measure a revision | ||
| before #7042 next to main. A measured no-win deletes this quest. | ||
|
|
||
| If it is real, let a stream keep one waiter (or `kio::Park`) across reads | ||
| again, for example in `coding::Reader`, instead of one per `kio::wait` | ||
| future. |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.