summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-09 13:47:53 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-09 13:47:53 -0400
commit4d06cb03bca3b4d60d45f3856502b00bcdbf3530 (patch)
tree861eae278d70e8c8134942064025bfc160175683 /kernel
parent0df1b9e72aa55d49caee303a75c2dc14c4c59e59 (diff)
downloadopen-iov-4d06cb03bca3b4d60d45f3856502b00bcdbf3530.tar.gz
open-iov-4d06cb03bca3b4d60d45f3856502b00bcdbf3530.zip
vgsp-sema: per-second GP_PUT snapshots for CE channels (ISSUE-0002 diag)
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_sema_service.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 7ab82ba..3692246 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -277,6 +277,7 @@ struct svc_channel {
* while the entry is pending, so the put is
* not a stable identity) */
unsigned long unread_until; /* expiry of the cheap-wait window */
+ unsigned long put_log_at; /* next per-channel put snapshot (diag) */
u64 unread_ipin_pa; /* injected-pin PA when the cheap-wait window
* opened: a replay waits cheaply while the same
* (possibly wrong) injection is all there is,
@@ -4694,6 +4695,7 @@ static u64 svc_rel_va_seen;
*/
static u32 svc_rel_count;
static u32 svc_dbg_streams;
+static u32 svc_chan_put_log;
/*
* Ring of recent GRCE inline-write destinations and their payload bytes
@@ -6711,6 +6713,7 @@ static void svc_session_flush(void)
*/
svc.gpfifo_entry_log = 0;
svc_dbg_streams = 0;
+ svc_chan_put_log = 0;
memset(svc_hot, 0, sizeof(svc_hot));
memset(svc_retry_q, 0, sizeof(svc_retry_q));
memset(svc_pool_pa, 0, sizeof(svc_pool_pa));
@@ -12159,6 +12162,21 @@ static void svc_pump_channels(struct nv_vgpu_device *vgpu)
}
/*
+ * ISSUE-0002 diag: per-second put snapshots for CE channels,
+ * bounded per session. Names whether a re-registered session's
+ * GP_PUT advances at all (the pump's view of the second
+ * client's submissions).
+ */
+ if (gsp_sema_dbg && ch->engine_type && svc_chan_put_log < 48 &&
+ time_after(jiffies, ch->put_log_at)) {
+ ch->put_log_at = jiffies + HZ;
+ svc_chan_put_log++;
+ pr_info("sema-put: h=0x%x uok=%d upa=0x%llx uas=%u put=%u get=%u last=%u\n",
+ ch->h_object, ch->userd_ok, ch->userd_pa,
+ ch->userd_as, put, get, (u32)ch->last_get);
+ }
+
+ /*
* P6c C3: a latched fault notifier is released when the guest
* submits more work (GPFIFO put advanced past the value at
* delivery), alongside the guest-ack read in