summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-09 22:01:27 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-09 22:01:27 -0400
commit4c1266e620423a0870c68e2228dbdcf6b2597d29 (patch)
treece91d49483ff7212ac74e33abb65e0cfd3372bd4 /kernel
parent6170701d0b62da5c6f59eea9e8c57f00b1262a90 (diff)
downloadopen-iov-4c1266e620423a0870c68e2228dbdcf6b2597d29.tar.gz
open-iov-4c1266e620423a0870c68e2228dbdcf6b2597d29.zip
vgsp-sema: limit the failed-op hold to large ops (>= 256 KB) (ISSUE-0002)
r72 showed the broad rule holding entries on small failed ops too: two opdef holds on h=0x5c000059 (entries 82/84) were never resolved and withheld their releases for the whole session, while c2 hit the pre-existing GR launch forward timeout. The scrub class this rule exists for is always large (r58/ r71: 1 MiB / 297 KiB / 608 KiB), so only failures of ops >= 256 KB mark the pass op-pending; small failing ops keep the old consume-and-apply behaviour.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_sema_service.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 77ae4b4..fa76162 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -4614,21 +4614,23 @@ static void svc_run_ops(struct nv_vgpu_device *vgpu, struct svc_memset_op *ops,
else
svc.memsets_fail++;
/*
- * ISSUE-0002 (r71): ANY failed op leaves work owed on this
- * entry, not only an unresolvable operand. The pma scrub
- * memsets resolve a bogus out-of-bounds vidmem destination
- * through a walk before the scanner pins the real sysmem
- * page; svc_copy fails them with -EINVAL, and the old code
- * consumed the entry and applied the release anyway, leaving
- * the client frozen in scrubCheckAndWaitForSize. Mark the
- * pass as op-pending so the pump holds the entry and
- * withholds its releases (bounded by SVC_OPDEF_HOLD_MS,
- * exactly like the -ENOENT path): the retried decode checks
- * the injected pins first and runs the memset once the real
- * translation lands. On expiry the release is flushed and the
- * op stays skipped (the pre-r62 fallback).
+ * ISSUE-0002 (r71/r72): a failed LARGE op leaves work owed on
+ * this entry. The pma scrub memsets (>= 256 KB) resolve a bogus
+ * out-of-bounds vidmem destination through a walk before the
+ * scanner pins the real sysmem pages; svc_copy fails them with
+ * -EINVAL, and the old code consumed the entry and applied the
+ * release anyway, leaving the client frozen in
+ * scrubCheckAndWaitForSize. Mark the pass as op-pending so the
+ * pump holds the entry and withholds its releases (bounded by
+ * SVC_OPDEF_HOLD_MS): the retried decode checks the injected
+ * pins first and runs the memset once the real translation
+ * lands. Deliberately limited to >= 256 KB: a small failing op
+ * (observed r72 c2) must not withhold a release that gates a GR
+ * launch with a 5 s poll deadline. On expiry the release is
+ * flushed and the op stays skipped (the pre-r62 fallback).
*/
- if (rc != 0 && rc != SVC_COPY_FORWARDED)
+ if (rc != 0 && rc != SVC_COPY_FORWARDED &&
+ m->bytes >= (256u << 10))
svc.op_tr_pending = 1;
if (gsp_sema_dbg && m->bytes == 256 && svc.sem256_log < 64) {
svc.sem256_log++;