feat(sched): arm the scheduler preemption-rate gate; ADR-0022 Accepted (prereq 2, PR-2) - #218
Merged
Merged
Conversation
…d (prereq 2, PR-2) Flips scripts/test_qos_sched.py from report-only to a real gate. It asserts the PR-1-calibrated scalar — preemptions per 1000 guest ticks — within [100, 600], on top of the non-vacuous liveness floor. The metric is a delta over GUEST ticks, so the band is host-CPU-invariant: a slow CI runner reads the same rate (it just takes longer wall-clock to fill the window). - FLOOR = 100 (= q5-median 200 x 0.5) catches a COARSENED round-robin cadence (the scheduler getting more sluggish — ADR-0022's regression direction). - CEIL = 600 (= q5-median x 3) is a loose thrash cap that does NOT redden on the intended future fix (a SMALLER quantum raises the rate). Revert-confirmed on WSL (feedback-anti-vacuous-boundary-gates — PR not done until RED observed): default SCHED_QUANTUM_TICKS=5 -> gate GREEN (rate 199.9); set 20 -> rate 49.9 < floor -> gate RED with "round-robin cadence has COARSENED"; restore 5 -> GREEN. (q=80 grinds the windowed harness itself, so 20 is the practical lever, as PR-1's calibration established.) Completes ADR-0022's second prerequisite, so the ADR flips to Accepted: the deferral decision and both prerequisites (latency gate + scheduler baseline) are done. The latency fix itself (the I/O-priority-boost epic or a measured quantum reduction) stays a deliberately deferred, now-unblocked future epic. No kernel change (docs + harness + gate comments only). py-compile + YAML green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR-2 of ADR-0022 prerequisite 2 — arms the scheduler baseline gate on the scalar PR-1's calibration selected, and flips ADR-0022 to Accepted.
scripts/test_qos_sched.pyflips from report-only to a real gate: it asserts preemptions per 1000 guest ticks in[100, 600](the calibrated metric, ~200 at the default quantum) on top of the non-vacuous liveness floor. Everything asserted is a delta over guest ticks, so the band is host-CPU-invariant — a slow CI runner reads the same rate.Revert-confirmed (anti-vacuous)
On WSL, byte-identical protocol:
SCHED_QUANTUM_TICKSThe gate reddens on exactly the regression the ADR guards (a coarsened quantum). q=80 grinds the windowed harness itself, so 20 is the practical lever — as PR-1's calibration established.
ADR status
Completes ADR-0022's second prerequisite, so the ADR flips to Accepted: the deferral decision and both prerequisites (latency gate + scheduler baseline) are done. The latency fix itself (the I/O-priority-boost epic, or a measured quantum reduction) stays a deliberately deferred, now-unblocked future epic — it now has both a proven latency gate and a proven scheduler baseline to be measured against.
Verification
No kernel change (docs + harness + gate comments only).
make ci-smoke-schedpasses at the default quantum (199.9 ∈ [100,600]); py-compile + YAML green.🤖 Generated with Claude Code