diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-24 08:16:30 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-24 08:16:30 -0400 |
| commit | 46a9e2b9baf786f6e01c50c56081e3dc5eac1e33 (patch) | |
| tree | 47d8e43831f17cf4995fa5eaf0df5e0697d69584 | |
| parent | 4b598b7561ae565dcf376d03f718e0d668878084 (diff) | |
| download | open-iov-46a9e2b9baf786f6e01c50c56081e3dc5eac1e33.tar.gz open-iov-46a9e2b9baf786f6e01c50c56081e3dc5eac1e33.zip | |
vgsp-gr r612: refuse the defer cap only for a DEGENERATE argument fill - stalled decoy candidates must not kill a launch whose real operands resolved
r586's fail-closed refused any launch still carrying unresolved argument
pages at the 15 s cap. streams2 as the first client of a fresh boot (r611)
shows the cost: its two launches carry candidates 0x783299000000 and
0x783297000000 that stall in EVERY source from the first fill (no pin, no
walk, no ledger; 'stalled VA' listed, never resolving in the run) while 969
real pages resolve, the r543 arg-defer is pre-empted by the CE watermark
defers, and at the cap both kernels are refused - STREAMS bad=65534 with the
engine never running.
Refuse only a degenerate fill (resolved < dropped - the r584 matmul shape, 2
resolved / 18 dropped, where the engine has no usable window). A
non-degenerate fill at the cap forwards historically and loudly
(fwd_gr_argfw witness): waiting longer cannot resolve a candidate stalled in
every source, and by this point every copy-related guard (dstpend, CE
watermark) has already had its chance and returned above when it fired.
| -rw-r--r-- | kernel/gsp_sema_service.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 00d9b56..c0be131 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -1132,6 +1132,10 @@ struct sema_svc { u64 fwd_gr_argdefer; /* r543: held for a partial * argument set (unresolved arg) */ u32 fwd_gr_argdefer_log; + u64 fwd_gr_argfw; /* r612: non-degenerate fill + * forwarded at the cap (stalled + * candidates are decoys) */ + u32 fwd_gr_argfw_log; u64 fwd_gr_cewm; /* r590: held on the CE ring's * live submission watermark */ u64 fwd_gr_cewm_cap; /* r590: watermark still @@ -21797,9 +21801,26 @@ static bool svc_gr_request(struct nv_vgpu_device *vgpu, * no-write). Refuse the forward, author the completion in software, * consume; the dropped pages were already demanded through the pin * channel (r585) so the retry path had its chance first. + * + * r612: refuse only a DEGENERATE fill - one whose dropped set is at + * least as large as the resolved set (r584's 2 resolved / 18 + * dropped). A launch with a full resolved window (969 resolved / + * 9 dropped) whose unresolved candidates are still unresolved at + * the absolute cap has them stalled in EVERY source for the whole + * window; they are the param page's decoy/foreign pointers (the + * r611 streams2 first-client capture: candidates 0x783299000000 / + * 0x783297000000, `stalled VA` from the first fill, no pin, no + * walk, no ledger, never resolving in the run) - waiting longer + * cannot help, and refusing converts a launch whose real operands + * all resolved into a guaranteed no-write client failure (streams2 + * bad=65534). At the cap the copy-related guards (dstpend, CE + * watermark) have already cleared or the refusal branches above + * win first, so a non-degenerate fill forwards historically, + * loudly witnessed. */ if (svc_fwd_req.gr_arg_partial && !svc_gr_data_stalled && - svc_gr_defer_expired(svc_gr_cand.push_va)) { + svc_gr_defer_expired(svc_gr_cand.push_va) && + svc_fwd_req.gr_n_data < svc_fwd_req.gr_dropped) { svc.fwd_gr_refused++; svc.fwd_gr_closed++; if (svc_gr_cand.rel_va) { @@ -21822,6 +21843,21 @@ static bool svc_gr_request(struct nv_vgpu_device *vgpu, * candidate is owned and sw-completed */ } /* + * r612: see the refusal note above - a non-degenerate fill at the cap + * forwards historically (witnessed once per budget slot). + */ + if (svc_fwd_req.gr_arg_partial && !svc_gr_data_stalled && + svc_gr_defer_expired(svc_gr_cand.push_va)) { + svc.fwd_gr_argfw++; + if (svc.fwd_gr_argfw_log < 32) { + svc.fwd_gr_argfw_log++; + pr_info("vgsp-work: GR forward at defer cap h=0x%x push=0x%llx (partial argument set: %u dropped of %u resolved; stalled candidates never resolve, forwarding historically)\n", + ch->h_object, svc_gr_cand.push_va, + svc_fwd_req.gr_dropped, + svc_fwd_req.gr_n_data); + } + } + /* * m150: the fill found high argument pointers that no source can * translate (the second-client zeros class). Do NOT forward a launch * whose kernel would dereference unresolved pointers: leave the |
