From 2eac7bf31bc2b146190e32cb1bd38a21d4a13aef Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Fri, 9 Oct 2026 13:47:53 -0400 Subject: vgsp-sema: per-second GP_PUT snapshots for CE channels (ISSUE-0002 diag) --- kernel/gsp_sema_service.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'kernel') 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)); @@ -12158,6 +12161,21 @@ static void svc_pump_channels(struct nv_vgpu_device *vgpu) ch->userd_as, &get, sizeof(get)); } + /* + * 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 -- cgit v1.2.3