summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-18 15:48:15 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-18 15:49:08 -0400
commit5e7d7861c95b472d21ad79bb05b59091748c5bf4 (patch)
treef890c4968f6958cba2861a0387b64f741f9d4e7a
parenta62ba6f234bad3264f71a77b833d9b22f0210c54 (diff)
downloadopen-iov-5e7d7861c95b472d21ad79bb05b59091748c5bf4.tar.gz
open-iov-5e7d7861c95b472d21ad79bb05b59091748c5bf4.zip
vgsp: bounded newbind/rebuild diagnostic tokens (r234 discrimination)
r233: ctaid_probe attempt-1 completed (newbind fix works) but the NEXT client (P2, fresh process after P1's CLEAN teardown+flush) stalled with zero tokens. witness-r233.log shows why: after the last FREE (180966.07) and rebuild #40 (180967.07) the guest sends ZERO traffic for 9+ s (only 'completion hint rc=-2'); no channel binding ever exists, so no entry-level recovery (pending-map/chanswitch/stale-entry) can apply. Pattern across boots: a CLEAN client exit is followed by a pre-registration stall; a KILLED client is followed by a working client. Diagnostics added (bounded 16/session each): - 'GR-STALL-newbind h=... put=... get=... action=window reason=stale-entry-newbind' when a binding's freshness window is armed (proves the reconcile runs per binding, not just once). - 'GR-STALL-rebuild consumed=1 by=svc_thread ...' when the service loop consumes svc.rebuild_now (proves the forced rebuild is taken; rules out the stale-flag hypothesis). wd_chanswitch/wd_newbind_until are per-channel/per-binding (armed on every !same_gen registration) - no global-state stomping between clients. make kernel green. (cherry picked from commit 2e6921f4fe7d2a0dcd478430981367a6e354465c)
-rw-r--r--kernel/gsp_sema_service.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index b7290d4..e7c690b 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -1029,6 +1029,10 @@ struct sema_svc {
bool rebuild_now;
u32 gr_pending_map; /* GR-STALL-pending-map lines
* emitted (bounded proof) */
+ u32 gr_newbind_log; /* GR-STALL-newbind window-armed
+ * lines emitted (bounded proof) */
+ u32 gr_rebuild_log; /* GR-STALL-rebuild consumption
+ * lines emitted (bounded proof) */
u64 fwd_gr_hold_exp; /* GRFIX FIX1: data-stalled holds
* that reached the hard bound and
* were consumed with the software
@@ -17254,6 +17258,17 @@ static void svc_pump_channels(struct nv_vgpu_device *vgpu)
svc_opdef_drop_channel(vgpu, ch->h_object, jiffies);
ch->wd_newbind_until = jiffies +
msecs_to_jiffies(SVC_GR_NEWBIND_MS);
+ /*
+ * Bounded proof (r234 asks): the window was armed for
+ * THIS binding; if a later stall shows no such line,
+ * its binding never reached the pump (pre-registration
+ * class) and this mechanism cannot apply.
+ */
+ if (svc.gr_newbind_log < 16) {
+ svc.gr_newbind_log++;
+ pr_info("vgsp-gr: GR-STALL-newbind h=0x%x put=%u get=%u action=window reason=stale-entry-newbind\n",
+ ch->h_object, put, get);
+ }
if (put > 1) {
svc.gr_stale_wedge++;
pr_warn_ratelimited("vgsp-gr: GR-STALL-stale-wedge h=0x%x va=0x%llx last=%u put=%u get=%u sub=%llu waited_ms=0 action=recover reason=stale-entry-chanswitch reset=0 rewind=0 entry=0 cpa=0x%llx rpa=0x%llx\n",
@@ -19989,6 +20004,15 @@ static int svc_thread(void *arg)
*/
if (svc.rebuild_now) {
svc.rebuild_now = false;
+ /*
+ * Bounded proof (r234 asks): a pump-requested
+ * rebuild was actually consumed by the service
+ * thread here (the only consumer).
+ */
+ if (svc.gr_rebuild_log < 16) {
+ svc.gr_rebuild_log++;
+ pr_info("vgsp-gr: GR-STALL-rebuild consumed=1 by=svc_thread action=rebuild reason=stale-entry-newbind\n");
+ }
svc_rebuild(vgpu);
if (sess)
sess->last_build = svc.last_build;