summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_gpu.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-21 11:39:25 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-21 11:39:32 -0400
commite77efad422961e5266ef30ef5ce9f49ae1fd76c1 (patch)
tree56bc8ba5002dfeda4c9cdf2745a47c50e9b063f2 /kernel/gsp_phys_gpu.c
parent9f68e5e304416a7d2148903eada9caffd7b0779e (diff)
downloadopen-iov-e77efad422961e5266ef30ef5ce9f49ae1fd76c1.tar.gz
open-iov-e77efad422961e5266ef30ef5ce9f49ae1fd76c1.zip
gr: r410 wedge quiet window - bounded idle hold before retrying a lane whose previous launch also no-wrote (r416: 58-launch sticky wedge clears after ~50 s quiet); wedge counters in state; wedge_recover v2 unmask
The r416 boot reproduced the sticky no-execute wedge inside 60 s: 58 consecutive launches accepted zero writes while the lane stayed busy (wedge_recover v1's deterministic verify masked every one of them), and the first launches were green again only after the lane sat idle ~52 s. Both r409 (~37 s idle heal) and r416 therefore show the wedge clears on idleness and persists under back-to-back retries (r154/r409), so the retry loop now holds a quiet window (gsp_phys_gr_wedge_quiet_ms, default 20000, doubling on the second quiet retry, 0 disables) before the normal fresh-bank + resched retry when the previous launch also no-wrote. The whole-launch stall budget is relaxed only on this bounded recovery path. NOWRITE lines now carry the consecutive streak and quiet/heal counters, and the state file shows nw_streak/wedge_quiet/wedge_heals. wedge_recover v2 mutates the inputs every iteration so a stale (never executed) launch can no longer match the expected values, and classifies the readback STALE-PREV(NOWRITE) vs OTHER/PARTIAL.
Diffstat (limited to 'kernel/gsp_phys_gpu.c')
-rw-r--r--kernel/gsp_phys_gpu.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c
index e896664..6bd5aa0 100644
--- a/kernel/gsp_phys_gpu.c
+++ b/kernel/gsp_phys_gpu.c
@@ -1124,6 +1124,35 @@ int gsp_phys_gr_nowrite_retries_value(void)
EXPORT_SYMBOL_GPL(gsp_phys_gr_nowrite_retries_value);
/*
+ * r410 wedge quiet window (gsp_phys_gr_wedge_quiet_ms; default 20000, clamped
+ * [0,120000]; 0 disables). The sticky per-lane no-execute wedge (100% of
+ * launches no-write while kept busy) is proven to CLEAR when the lane stays
+ * quiet for tens of seconds (r409: a ~37 s client gap healed a wedged run;
+ * r416: 58 consecutive no-write launches during a 126 s client run, first
+ * launches green again after the lane sat ~52 s idle). Immediate retries and
+ * re-arms do not heal it (r409/r154). So when a zero-write outcome follows a
+ * previous accepted zero-write launch, the retry loop first holds this many ms
+ * with NO submissions to the engine, then re-arms (lane enable + schedules)
+ * and re-publishes once. The value doubles per further quiet retry. The
+ * quiet window is recovery-only: a launch that wrote anything never enters it.
+ */
+static unsigned int gsp_phys_gr_wedge_quiet_ms_param = 20000u;
+module_param_named(gsp_phys_gr_wedge_quiet_ms,
+ gsp_phys_gr_wedge_quiet_ms_param, uint, 0644);
+MODULE_PARM_DESC(gsp_phys_gr_wedge_quiet_ms,
+ "Quiet-window ms before retrying a launch on a lane whose previous launch also no-wrote (0=disable, default 20000)");
+
+unsigned int gsp_phys_gr_wedge_quiet_ms_value(void)
+{
+ unsigned int v = gsp_phys_gr_wedge_quiet_ms_param;
+
+ if (v > 120000u)
+ v = 120000u;
+ return v;
+}
+EXPORT_SYMBOL_GPL(gsp_phys_gr_wedge_quiet_ms_value);
+
+/*
* m69 window-0 shadow pool (gsp_phys_rmcall_gr_shadow_win0; default 0). When
* set, the forwarded GR launch copies the QMD's program/param pages into the
* window-0 shadow pool (module pages at VAs 0x108000..0x10f000, PTEs planted