summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-21 06:49:44 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-21 06:49:44 -0400
commitd84e4ac55e1dec7e1ce3d8ad8b9c0db9682d48eb (patch)
treeb0b6f9510bf05475570954a14a255c4acc836e3a /kernel/gsp_sema_service.c
parent3077c18f3acc20c0b92de7a8337c175c14986b94 (diff)
downloadopen-iov-d84e4ac55e1dec7e1ce3d8ad8b9c0db9682d48eb.tar.gz
open-iov-d84e4ac55e1dec7e1ce3d8ad8b9c0db9682d48eb.zip
sema: r408 acquire-wait gate defaults ON (the r408 streams2d readback race) + explicit param desc
With the gate off (the mission cycle recipe omitted sema_wait_gate=1), the c2 readback's C56F ACQ_CIRC_GEQ pay=4 ran at 106617.279 with cur=2 - before the c2-add launch was even submitted (106617.411) - and read the not-yet-produced buffer (all zeros). With the gate on the same readback holds until the scale channel's progress counter reaches 4 (sema-wait: hold ... cur=2 waited_ms=353 -> pass ... cur=4) and the ordering is correct. The holds are bounded (sema_wait_hold_ms, default 4000) and fail open loudly, so the pre-r336 pass-through remains available with sema_wait_gate=0 for an A/B.
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 53e2140..0354831 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -13396,20 +13396,28 @@ bool gsp_sema_pool_hold_fresh = 1;
bool gsp_sema_copy_dst_pin_guard = 1;
/*
* r336/r34x wait gate: honor the C56F host-semaphore acquire ops captured
- * for a ring entry before running its work. Still DEFAULT OFF (opt-in
- * experiment; the module param sema_wait_gate=1 enables it), but the
- * semantics are now the class contract's: op 0 = equal, 2 = strict GEQ,
- * 3 = circular GEQ, 4 = AND, 5 = NOR; the wait set is captured PER ENTRY
- * (the old single-last-wait global leaked a later entry's acquire into an
- * earlier entry - the r340 over-hold); the entry's own release counts only
- * when its method order precedes the acquire; pending releases our
- * machinery is merely late about are drained first; and every hold is
- * bounded at SVC_WAIT_HOLD_MS (100 ms) then fails open loudly ('give-up')
- * so a value that can only be installed behind an upstream opdef hold
- * cannot park a channel. Diagnostics: 'sema-wait: pass/hold/give-up' rows
- * carry op, payload, observed value and decision.
- */
-bool gsp_sema_wait_gate;
+ * for a ring entry before running its work. DEFAULT ON since r408: the
+ * r408 streams2d forensics reproduced the class the gate was built for
+ * with the gate off - the c2 readback (C56F ACQ_CIRC_GEQ pay=4 on the
+ * scale channel's progress counter 0x20400ffd0) ran at 106617.279 with
+ * cur=2, i.e. BEFORE the c2-add launch was even submitted (106617.411),
+ * read the not-yet-produced buffer (zeros) and the client failed with
+ * 'c2 all zeros'. With the gate on the same readback holds (sema-wait:
+ * hold ... cur=2 waited_ms=353) until the counter reaches 4 (pass ...
+ * cur=4 at 106812.259) and the ordering is correct. The semantics are
+ * the class contract's: op 0 = equal, 2 = strict GEQ, 3 = circular GEQ,
+ * 4 = AND, 5 = NOR; the wait set is captured PER ENTRY (the old
+ * single-last-wait global leaked a later entry's acquire into an earlier
+ * entry - the r340 over-hold); the entry's own release counts only when
+ * its method order precedes the acquire; pending releases our machinery
+ * is merely late about are drained first; and every hold is bounded at
+ * gsp_sema_wait_hold_ms (default 4000 ms, r401) then fails open loudly
+ * ('give-up') so a value that can only be installed behind an upstream
+ * opdef hold cannot park a channel. Diagnostics: 'sema-wait:
+ * pass/hold/give-up' rows carry op, payload, observed value and decision.
+ * sema_wait_gate=0 restores the pre-r336 pass-through for an A/B.
+ */
+bool gsp_sema_wait_gate = 1;
/*
* m169b: the guard above must never deadlock the boot's first client. The