📝 The guest measures the rate it is served once, keeps the answer, and that one window is worth a factor of two

Component: `crates/reims-vgpu` — docs only, on
`runtime::drain::census`'s `VBL_REPORT_EARLY` and on
`signal_display_refresh_classes`. No behaviour change.

The early-cadence instrument from 982fda6d has been run: eight driven macos-13
boots of one binary, quiesced host, sustained-animation probe, no guest panic on
any of them.

The **first sustained `arm=delivered` window** — the guest's first stretch of
holding VBL armed continuously, landing near `delivered=128` — predicts the rate
the guest then keeps, eight times out of eight:

    boot   first sustained window   presented frames/s
    b1            60.5 Hz                  59
    b2-b8    119.2 - 120.5 Hz           99 - 108

So the boot-to-boot "regime" this repository has been classifying around for
many sessions is not a compositing mode the guest picks per workload. It is a
measurement the guest takes once, within about nine seconds of the display
coming up, and never repeats.

The part that changes what to do next: **it does not revisit the answer.** b1
went on to receive 103-116 Hz of VBL from t=38 s onward and still presented 59
frames a second for the whole driven window. A guest that measured 60 Hz early
keeps a 60 Hz compositor however fast it is served afterwards. Every rail in this
device that affects steady-state pacing is therefore acting after the factor of
two has already been chosen, which is why a real change to it can measure as
nothing.

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 missed the grid, not the limiter — that held its usual ~118 Hz in b1
exactly as in the seven fast boots.

This also corrects how cf77ab7e should be ranked, and that doc now says so. Its
ordering can only matter through what this one window reads, which is a
probability over boots rather than a rate, and n=3 an arm cannot measure one.
Steady-state `present_hz` was the wrong instrument for it. Across every boot on
record the fixed ordering has latched fast 9 times in 11 and the old ordering 4
in 9, which is suggestive and not a result — those runs were not interleaved.

Verified: 1898 lib tests green serially; clippy `-D warnings` clean on the Vulkan
arm; `cargo doc` intra-doc link pass clean for the links added here (the
reference to the private `VBL_REPORT_EARLY` is prose beside a link to the type
that carries it, rather than widening visibility for a hyperlink).

Not verified: no cause is claimed for why one boot's guest is slow to re-arm in
that window. The 9/11-vs-4/9 latch rates are from non-interleaved runs on
different binaries and must not be quoted as an effect size; an interleaved run
long enough to band a Bernoulli outcome has not been done.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Anees IqbalandClaude committed 2026-08-11 21:11:34 +03:00
1 parent 982fda6d0c
commit cad67521ea
2 files changed
+46 -7

No files matched your search

@@ -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;
+14 -7
View File
@@ -5225,13 +5225,20 @@ pub(crate) fn display_event_enabled<H: HostMemory>(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