mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 08:41:13 -07:00
kernel.pic-soc-load: the move bound is a third of the split, not half
The check decided on one count of noise. Measured over eleven runs on the bench the settled reader moves 3 counts off the idle regime (once 2, once 4) against a control split of 6 (once 7), so a half-split bound sits exactly on the median: two of those eleven runs failed while the machine read identically to the nine that passed, and the queue stopped on one of them. The kernel's spin is its own load level, a couple of counts under a Python spin, so a settled reader lands above the idle regime without reaching the busy one. Asking it to reach halfway was asking for something the mechanism does not promise. What the check has to catch is a settle that overshoots and lets the conversion fall back to idle, which reads as no move at all, and a third of the split catches that with a count of margin either way. The split collapsing is still the primary proof, unchanged above.
This commit is contained in:
@@ -896,12 +896,22 @@ def pic_soc_load(ctx):
|
||||
"settled reads still split by %+d counts between an idle and a busy reader", ev["settled_split"])
|
||||
ctx.check(settled["idle"]["iqr"] <= 4 and settled["busy"]["iqr"] <= 4,
|
||||
"settled reads spread %d / %d counts (interquartile)", settled["idle"]["iqr"], settled["busy"]["iqr"])
|
||||
# The kernel's spin is its own load level, a count or two under a Python
|
||||
# spin; what the settle must do is move an idle reader off the idle regime
|
||||
# and toward the busy one, by at least half the control's split.
|
||||
# The kernel's spin is its own load level, a couple of counts under a
|
||||
# Python spin, so a settled reader lands above the idle regime without
|
||||
# reaching the busy one. The failure this guards is a settle that
|
||||
# overshoots and lets the conversion fall back to idle, which reads as
|
||||
# no move at all; the split collapsing above is the primary proof.
|
||||
#
|
||||
# The bound is a third of the control split, not half. Measured over
|
||||
# eleven runs on this bench the move is 3 counts (once 2, once 4)
|
||||
# against a control split of 6 (once 7), so a half-split bound sits
|
||||
# exactly on the median and decides on one count of noise: two of those
|
||||
# eleven runs failed with the machine reading identically to the nine
|
||||
# that passed. A third keeps the guard against no move at all and
|
||||
# leaves a count of margin either way.
|
||||
moved = settled["idle"]["med"] - control["idle"]["med"]
|
||||
ev["settled_idle_moved"] = moved
|
||||
ctx.check(ev["control_split"] <= 2 or moved >= (ev["control_split"] + 1) // 2,
|
||||
ctx.check(ev["control_split"] <= 2 or moved * 3 >= ev["control_split"],
|
||||
"a settled idle reader moved %+d counts off the idle regime, the control split is %+d: "
|
||||
"the settle did not land the conversion under load", moved, ev["control_split"])
|
||||
ctx.check(ev["pic_settle_us_after"] == "500", "pic_settle_us left at %s", ev["pic_settle_us_after"])
|
||||
|
||||
Reference in New Issue
Block a user