Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5fd206b
chore(quest): claim quest/m2/evicted-refill.md
kixelated Oct 30, 2026
b8cbf65
fix(net): refill groups evicted before a reader took them
kixelated Oct 30, 2026
04118d6
Merge remote-tracking branch 'origin/main' into quest/m2/evicted-refill
kixelated Oct 30, 2026
3d311c8
fix(net): keep evictions only within what a reader judged
kixelated Oct 30, 2026
d46b18e
fix(net): keep an eviction run only while a reader that judged it lags
kixelated Oct 30, 2026
6e265b9
refactor(net): leave evictions in the inbox of each reader that judge…
kixelated Oct 30, 2026
13b6b94
test(net): gate the inbox accessor with its async test
kixelated Oct 30, 2026
2630b03
fix(net): prune a dropped reader's inbox on each eviction
kixelated Oct 30, 2026
74bcc1c
Merge remote-tracking branch 'origin/main' into merge-7339
kixelated Oct 31, 2026
88d6ebb
fix(net): give up a refill evicted again on either read order
kixelated Oct 31, 2026
1429863
style(net): format the refill give-up
kixelated Oct 31, 2026
64c2911
fix(net): forget a refill once it is handed out
kixelated Oct 31, 2026
6764dee
fix(net): forget a refill handed out at the last sequence too
kixelated Oct 31, 2026
32e06e3
docs(net): say why the last sequence needs no refill bookkeeping
kixelated Oct 31, 2026
84f78f0
Merge branch 'base' into pr-7339
Oct 31, 2026
c33f7f1
test(net): follow Fill wanted rename in eviction tests
Oct 31, 2026
27cce08
Merge branch 'base' into pr-7339
Nov 1, 2026
861f734
fix(net): follow base removal of sync mutex re-export
Nov 1, 2026
be99ce5
quest land: merge tested base
Nov 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/concept/moq-lite.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ starts) is asked of the track's dynamic handler
as a fill, which a relay serves by fetching upstream one group at a time, skipping
a group once every subscriber that asked for it narrows past it; with
no handler it is reported as dropped once the feed stops waiting for it. One
evicted after the subscriber saw it cached, but before it read it, is skipped. A relay merges its subscribers' ranges into one upstream request, which
evicted after the subscriber saw it cached, but before it read it, is asked the same
way, once: evicted again before it is read, it is reported as dropped. A relay merges its subscribers' ranges into one upstream request, which
moq-lite-07 carries range by range and older wire versions as the single span
covering them. A relative or time anchor resolves on the hop that publishes the
track, and over moq-lite-07, which carries a relative or time start upstream and
Expand Down
4 changes: 0 additions & 4 deletions quest/m1/unbounded-groups/flights.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,3 @@ Public API: none. Wire: none, beyond the existing frame-offset fills.
## Required

- [Fastest-reader pacing](/quest/m1/unbounded-groups/fastest-reader.md) - flights pace on their fastest rider the same way the live edge does

## Related

- [Refill evicted groups](/quest/m2/evicted-refill.md) - refills whole groups evicted before a reader took them
1 change: 0 additions & 1 deletion quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ lite-07; bitrate enforcement is not part of this release.
- [Shared group serving and ingest](/quest/m2/shared-serve.md) - Rust's moq-lite and moq-transport sessions serve and ingest groups through one poll machine each, with only wire encoding per protocol
- [Shared group serving and ingest in JS](/quest/m2/shared-serve-js.md) - the same split in js/net, following the Rust seam
- [Paired bench BASE](/quest/m2/bench-base-paired.md) - `just bench <base>` uses the nightly's paired comparison and the old one is deleted
- [Refill evicted groups](/quest/m2/evicted-refill.md) - a group evicted after a reader judged it but before it took it is refilled, never delivered twice, and guarded against thrash
- [Receive pool](/quest/m2/receive-pool.md) - one byte budget per worker covers every connection's receive credit and the cache, billing each frame once
- [Front parking](/quest/m2/origin-front-parks.md) - an unroutable request waits on a front instead of re-asking on every route-table move
- [Route wakes](/quest/m2/route-wakes.md) - a route change wakes only the fronts it can move, so pool churn stops scaling with served paths
Expand Down
36 changes: 0 additions & 36 deletions quest/m2/evicted-refill.md

This file was deleted.

46 changes: 46 additions & 0 deletions rs/moq-net/benches/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
//! wall clock: each empty group is handed out like any other, so a walk over the rest of
//! the run per group shows up as a slope over it.
//!
//! `track_evict_fanout` writes groups into a full pool, each evicting one that every reader
//! judged cached, swept over the readers and the groups written between their reads: each
//! eviction leaves the group in every reader's inbox, so its cost grows with the readers,
//! and a cost that grows with the groups written beyond that shows up as a slope.
//!
//! `track_fanout_frame` writes frames into an open group while every subscriber is parked
//! on the next one, re-polling whichever reader the write woke: a frame wakes no track
//! reader, so waking them shows up as a slope over the subscribers.
Expand Down Expand Up @@ -553,6 +558,46 @@ fn bench_fanout(c: &mut Criterion) {
group.finish();
}

/// Groups written between reads in `track_evict_fanout`, each evicting one.
const EVICTED: [usize; 3] = [1, 8, 64];

fn bench_evict_fanout(c: &mut Criterion) {
let mut group = c.benchmark_group("track_evict_fanout");
for subscribers in FANOUT {
for evicted in EVICTED {
group.throughput(Throughput::Elements(evicted as u64));
group.bench_function(BenchmarkId::new(format!("{subscribers}r"), evicted), |b| {
let mut fanout = Fanout::new(subscribers);
// Twice what the pool holds, so every write evicts.
for _ in 0..2 * CACHE_CAPACITY / PAYLOAD as u64 {
fanout.cycle();
}
// Only the writes and the evictions they cause are timed, not the reads that
// judge each written group cached again.
b.iter_custom(|iterations| {
let mut elapsed = Duration::ZERO;
for _ in 0..iterations {
let start = Instant::now();
for _ in 0..evicted {
let mut group = fanout.track.append_group().unwrap();
group.write_frame(Timestamp::ZERO, fanout.payload.clone()).unwrap();
group.finish().unwrap();
}
elapsed += start.elapsed();
for (subscriber, waiter) in fanout.subscribers.iter_mut().zip(&fanout.waiters) {
while let Poll::Ready(Ok(Some(group))) = subscriber.poll_recv_group(waiter) {
black_box(group);
}
}
}
elapsed
});
});
}
}
group.finish();
}

/// Frames written per group in `track_fanout_frame`, after which the group rolls and every
/// subscriber takes the next one: enough that the roll's cost per frame stays small.
const FRAMES_PER_GROUP: usize = 256;
Expand Down Expand Up @@ -1946,6 +1991,7 @@ criterion_group!(
bench_budget_widening,
bench_fanout,
bench_fanout_frame,
bench_evict_fanout,
bench_fetch_expiry,
bench_fetch_budgets,
bench_fetch_park,
Expand Down
Loading