summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index dfe7c3f..d2c7eaf 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -8503,6 +8503,7 @@ static u64 svc_rel_va_seen;
* on every decoded release regardless of its target.
*/
static u32 svc_rel_count;
+static u32 svc_fake_rel_log; /* r576b DIAG: sema-fake witness budget */
static u32 svc_dbg_streams;
static u32 svc_chan_put_log;
/* ISSUE-0002 (r55): per-rank put-snapshot throttle (ch is a local copy). */
@@ -16554,6 +16555,22 @@ static bool svc_fake_release(struct nv_vgpu_device *vgpu, struct svc_channel *ch
svc_pending_add(pool_va, deliver, 0);
svc.releases_forwarded++;
}
+ /*
+ * r576b DIAG: witness every authored/queued recovery release and the
+ * target it chose. The r575 atomics wedge (a UVM tracker wait for
+ * payload 34 that stalled at 25 while the ring was consumed) needs
+ * this to prove which VA the fakes targeted when the client's pool
+ * stopped advancing - last_rel_va is learned from readable pushes and
+ * a foreign release VA there would send every later recovery to the
+ * wrong semaphore.
+ */
+ if (gsp_sema_dbg && svc_fake_rel_log < 256) {
+ svc_fake_rel_log++;
+ pr_info("sema-fake: h=0x%x pool=0x%llx deliver=%u delivered=%d have_pa=%d last_rel=0x%llx exp=%u\n",
+ ch->h_object, pool_va, deliver, delivered ? 1 : 0,
+ have_pa ? 1 : 0, ch->last_rel_va,
+ ch->expected_sem_payload);
+ }
svc.releases_faked++;
svc_rel_count++;
ch->expected_sem_payload++;