Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion quest/m0/nightly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ Public API: none. Wire: none.
## Required

- [Feature shapes in the gate](/quest/m0/nightly/feature-shapes.md) - feature-gated dead code fails the PR that adds it, not the next Nightly
- [ts_schedule regression](/quest/m0/nightly/ts-schedule.md) - the moq-mux `ts_schedule` benches return to their old cost
- [Nightly's base in a shallow checkout](/quest/m0/nightly/shallow-base.md) - `sh/gh/nightly.test.py` passes in Nightly's depth-1 checkout
- [Advisory bumps](/quest/m0/nightly/advisories.md) - both audits pass on today's advisories
21 changes: 0 additions & 21 deletions quest/m0/nightly/ts-schedule.md

This file was deleted.

4 changes: 4 additions & 0 deletions rs/moq-mux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ moq-clock = { workspace = true, features = ["sim"] }
tokio = { workspace = true, features = ["test-util"] }
tracing-test = { workspace = true, features = ["no-env-filter"] }

# The ts_schedule bench pins glibc's heap.
[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dev-dependencies]
libc = { workspace = true }

[[bench]]
name = "catalog"
harness = false
Expand Down
16 changes: 16 additions & 0 deletions rs/moq-mux/benches/ts_schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,22 @@ fn packet(pid: u16) -> [u8; 188] {
packet
}

/// Pin glibc's heap so every slot reuses it. A padded slot at 100 Mb/s lays out about 300 KB,
/// right at the size where glibc adapts between `mmap` and the heap and trims the heap's
/// top, so which one a run settles on, and with it fresh page faults on every slot, flips
/// with the process's heap history alone: that was a 5x swing on the ARM runners with no
/// change to the schedule.
fn hold_heap() {
#[cfg(all(target_os = "linux", target_env = "gnu"))]
// SAFETY: mallopt only tunes the allocator, called before anything is measured.
unsafe {
assert_eq!(libc::mallopt(libc::M_MMAP_THRESHOLD, 32 << 20), 1);
assert_eq!(libc::mallopt(libc::M_TRIM_THRESHOLD, libc::c_int::MAX), 1);
}
}

fn admission(c: &mut Criterion) {
hold_heap();
let mut group = c.benchmark_group("ts_schedule");
group.measurement_time(Duration::from_secs(1));
group.warm_up_time(Duration::from_millis(200));
Expand Down Expand Up @@ -76,6 +91,7 @@ fn admission(c: &mut Criterion) {
/// Padded layout across queued tracks and access-unit size, each track's first unit with the
/// tables ahead of it, the larger units spanning several slots.
fn tables(c: &mut Criterion) {
hold_heap();
let mut group = c.benchmark_group("ts_schedule_tables");
group.measurement_time(Duration::from_secs(1));
group.warm_up_time(Duration::from_millis(200));
Expand Down
Loading