diff --git a/crates/reims-vgpu/src/runtime/drain/census.rs b/crates/reims-vgpu/src/runtime/drain/census.rs index 14b50cf28..e52242c9c 100644 --- a/crates/reims-vgpu/src/runtime/drain/census.rs +++ b/crates/reims-vgpu/src/runtime/drain/census.rs @@ -68,6 +68,38 @@ const VBL_REPORT_EVERY: u64 = 1024; /// later lines could recover it. Sixteen finer lines at the head of each arm cost /// nothing and cover the first ~9 s. /// +/// # What it found: one window decides the whole boot +/// +/// Eight driven macos-13 boots of one binary, quiesced host. The **first +/// sustained `arm=delivered` window** — the guest's first stretch of holding VBL +/// armed continuously, which lands around `delivered=128` — predicts the rate +/// the guest keeps, 8 times out of 8: +/// +/// ```text +/// boot first sustained window presented frames/s +/// b1 60.5 Hz 59 +/// b2-b8 119.2 - 120.5 Hz 99 - 108 +/// ``` +/// +/// The guest measures the rate it is being served, once, and holds the answer. +/// +/// **It does not revisit it.** b1 went on to receive 103-116 Hz of VBL for the +/// rest of the boot, from `t=38 s` onward, and still presented 59 frames a +/// second throughout. So this is not "the compositor runs as fast as it is +/// paced": a guest that measured 60 Hz early keeps a 60 Hz compositor no matter +/// what it is offered afterwards, and the only opportunity to influence it has +/// closed by about nine seconds after the display comes up. +/// +/// That is why the early lines matter more than every later line put together, +/// and why a change to this device's steady-state pacing can be real and still +/// move nothing: by the time the probe drives the guest, the factor of two has +/// already been chosen. +/// +/// What made b1's window read 60.5: across it the device delivered 64 VBL and +/// declined 128, so the guest was found armed on about a third of ticks. Its +/// re-arm turnaround, not the limiter, is what missed the grid — the limiter +/// held its usual ~118 Hz in that boot as in every other. +/// /// This is an instrument, not a rail: nothing branches on it. const VBL_REPORT_EARLY: u64 = 64; diff --git a/crates/reims-vgpu/src/runtime/drain/mod.rs b/crates/reims-vgpu/src/runtime/drain/mod.rs index 04090457e..16e847e80 100644 --- a/crates/reims-vgpu/src/runtime/drain/mod.rs +++ b/crates/reims-vgpu/src/runtime/drain/mod.rs @@ -5225,13 +5225,20 @@ pub(crate) fn display_event_enabled(host: &H, gpa: u64, event_mas /// an 8.47 ms grid, so its turnaround lands past the grid point often, and it is /// precisely those ticks the old ordering spent. /// -/// **It does not explain the boot-to-boot regime split, and the first version of -/// this doc claimed it did.** The guest latches either a ~60 Hz or a ~120 Hz -/// display link early in the boot and holds it, and the split came out 2 fast to -/// 1 slow on *both* arms — unchanged. The slow arm is not a delivery shortfall -/// this ordering can repair: B3 received 54 % more VBL than A2 and presented the -/// same 59 frames a second, so a guest in that state is not asking for more. -/// Whatever picks the latch is upstream of everything here and is still open. +/// **It does not by itself explain the boot-to-boot regime split, and the first +/// version of this doc claimed it did.** The split came out 2 fast to 1 slow on +/// *both* arms at n=3. The slow arm is not a steady-state delivery shortfall this +/// ordering repairs: B3 received 54 % more VBL than A2 and presented the same 59 +/// frames a second. +/// +/// What the split is, is settled — see `VBL_REPORT_EARLY` beside +/// [`census::VblCensus`]. The guest +/// measures the rate it is served across **one early window**, latches 60 Hz or +/// 120 Hz from it, and never revisits the answer however fast it is served +/// afterwards. So this ordering can only matter to the extent it changes what +/// that one window reads, which is a probability over boots and not a rate, and +/// n=3 an arm cannot measure one. Ranking this change on steady-state +/// `present_hz` was the wrong instrument. /// /// Reading the mask first cannot deliver faster than the advertised rate — /// [`claim_display_vbl`] still gates every delivery on a full interval having