Repository navigation
helios: force a wide round after persistent width-one selection - #571
malventano wants to merge 2 commits into
Conversation
Why: The scheduler can remain in ordinary width-one speculative selection with no upper bound. NVIDIA#540 addresses refresh credit lost across idle gaps and timing debt inflated by disk readiness wait, but another cause can still leave width one selected. Width one gives up most of the available speculative throughput. What: Count consecutive committed ordinary width-one plans. After two such plans, and after funded refresh and acceptance probes decline to produce a plan, select the widest available speculative candidate with the same batch and lane mask. Recompute the forced candidate's lane lengths, leave probes and unrelated lanes unchanged, and log the selection as Forced wide. Result: The scheduler gets one wide speculative attempt instead of continuing indefinitely at width one. The fallback is bounded by the prepared candidate set and does not repair the estimates. It can fire again if the wide round does not change the conditions that made width one look attractive. Evidence: A dedicated scheduler test commits two ordinary width-one plans and asserts that the fallback selects width 8. The forced-wide-only tree matches the clean d17efdd test baseline at 48 threads: 1646 passed, 8 failed, 43 ignored versus 1645 passed, 8 failed, 43 ignored. The eight failures are the clean baseline set, and the extra pass is the new fallback test. A live 1017 log shows the fallback selecting width 8 after width one, but there is no control run without the fallback and therefore no causal recovery claim. Limitations: The fallback matches batch and lane mask but not exact packed capacity. It waits two committed width-one plans, can repeat if width one persists, and can select a slower wide plan. NVIDIA#540 remains the prevention change and should be resolved first. Design-Signed-Off-By: opencode; design-review=c3a9 Signed-off-by: malventano <[email protected]>
|
A case file has been opened for 571. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Review StoppedAuto-Review halted due to finding: It is low value or does not align with the project charter. |
|
Parking this until #540 lands and a same-base control measurement is complete. The current forced picker selects the widest and most padded candidate, so it can make rounds more expensive without recovering throughput. I will rework it as a value-priced rule with a measured candidate, its own execution origin, and served A/B evidence if width-one episodes persist after #540. |
Why: A scheduler can remain in ordinary width-one speculative selection after the funded refresh and acceptance probes decline to produce a wider plan. The previous fallback forced the widest geometry, which could select an unmeasured or heavily padded shape, make the round much more expensive, and repeat on every two width-one plans. The measured candidate costs and the width-one state are rare and load-dependent, so a served A/B is not practical. What: Track the width-one streak, the next probe point, the probe interval, and the target width in the scheduler refresh state. Start at width two, select only a measured wider candidate after padding pruning, escalate the target width on later probes, and double the interval up to 64 width-one plans. Give the probe its own plan and timing origin, exclude it from ordinary refresh and acceptance credit, and expose it in the scheduler execution counters. Reset the state when an ordinary wide plan succeeds. Result: A persistent width-one state receives a bounded, measured probe instead of a repeated maximum-width round. Normal width-eight selection is unchanged. Evidence: The existing scheduler test now selects the measured width-two probe, and a new test asserts probes at width-one counts 2, 4, and 8. The scheduler policy suite passes 146 tests with 2 ignored. The captured 19:57:07 episode shows width one at 4.63 ms with measured wider candidates at 5.24 to 7.08 ms; the 19:58:29 episode shows the old fallback selecting a 13.553 ms width-eight round and firing repeatedly. The 64-seed simulator cannot synthesize this load-dependent state, so it remains a regression check rather than the repro. Design-Signed-Off-By: opencode; design-review=c3a9
|
Updated the draft with the revised probe. It now starts at a measured width two after padding pruning, escalates only when needed, backs off at width-one counts 2, 4, 8, and beyond, has its own execution origin and counters, and earns no ordinary refresh credit. I am testing this locally to collect future repros, but the refined draft stands on the captured scheduler state and the new tests. The 19:57/19:58 capture shows width one at 4.63 ms, measured wider candidates at 5.24 to 7.08 ms, and the old fallback selecting a 13.553 ms round and firing repeatedly. An A/B is not practical for a rare load-dependent state, and the 64-seed simulator cannot synthesize it. |
|
Posted for others who may be trying to repro this rare case. Width one means a speculative verification round with zero draft tokens. A width-one choice is often correct; the case of interest is the rare, intermittent one where it keeps winning even though a measured wider shape is available. If you hit it, capture one contiguous block from the first width-one plan through several plans after the next wide round. The sequence is the useful evidence, not a single line. For each scheduler decision, log:
Also record these counters before and after the run:
Without the change, a captured episode would show repeated ordinary width-one plans, no probe action, probe counters at zero, and low or negative acceptance credit with probes blocked or finding no candidate. With the change, a captured episode would show a probe action selecting width two, a width-one-probe execution count, width-two speculative rounds, and later probes spaced at width-one counts 2, 4, 8, and beyond if width one returns. Include the request shape, concurrency, server image, core revision, and whether the change was applied. |
Review StoppedAuto-Review halted due to finding: It is low value or does not align with the project charter. |
A scheduler can remain in ordinary width-one speculative selection after the
funded refresh and acceptance probes decline to produce a wider plan. The
previous fallback forced the widest geometry, which could select an unmeasured
or heavily padded shape, inflate the round cost, and repeat on every two
width-one plans. This refinement keeps the escape but bounds and prices it.
The scheduler now tracks a width-one streak, the next probe point, the probe
interval, and a target width. It starts with a measured width-two candidate
after padding pruning, escalates the target on later probes, doubles the
interval up to 64 width-one plans, and resets on an ordinary wide plan. Probes
have their own plan and timing origin, earn no ordinary refresh or acceptance
credit, and appear in the scheduler execution counters. If no measured wider
candidate shares the batch and mask, no probe runs.
The result is a bounded probe in the stuck state while the normal width-eight
path is unchanged. Tests assert a measured width-two probe and probe points at
width-one counts 2, 4, and 8. The scheduler policy suite passes 146 tests with
2 ignored. The captured 19:57:07 episode shows width one at 4.63 ms and
measured wider candidates at 5.24 to 7.08 ms; the 19:58:29 episode shows the
old fallback choosing a 13.553 ms width-eight round and firing repeatedly.
This is a preventative guard for a rare, non-deterministic state. We are
testing the refined method locally to collect future repros. The draft stands
on the captured scheduler state and regression tests; the 64-seed simulator
cannot synthesize this load-dependent state and is used only as a regression
check.
Discord: malventano