summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/gsp_sema_service.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 6a1595e..4a86235 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -11498,6 +11498,26 @@ static void svc_counter_publish(struct nv_vgpu_device *vgpu,
if (!pa)
return;
+ /*
+ * COMPLETION GATE (r205 mail/matmul regression): GP_PUT is the
+ * client's SUBMISSION position; the pump's last_get is its next
+ * unconsumed entry. While any submitted entry is outstanding
+ * (last_get != put) the pushes up to put have NOT all completed, so
+ * the put must never be published into the completion word: doing so
+ * short-circuits every client wait (r205 mail: rank-0's word jumped
+ * to the submitted 108 at last_get=104 - `pub-adv h=0x5c000019
+ * pa=...ff0 val=108 cur=104` - ~1 s before the engine ran
+ * `output retirement wait: 1/968 ... settled`, so the host's
+ * sub-put release payloads were then forward-only-skipped and the
+ * client read a stale buffer and failed; matmul's stage ordering
+ * broke the same way). Only the release applies deliver completions;
+ * this publish is the catch-up for entries the pump consumed WITHOUT
+ * a decoded release, so it may run solely when nothing is
+ * outstanding - the same equality the entry loop consumes to
+ * (wrap-safe for the 1024-entry rings).
+ */
+ if (ch->last_get != put)
+ return;
svc.counter_pub_calls++;
if (gsp_sema_dbg && !ch->engine_type &&
svc.counter_pub_dbg < 96) {