summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 15:48:18 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 15:48:18 -0400
commit6840a17b11f55b483ff6d80ed743465c99d420a3 (patch)
tree82c795ccdfc5ace592108f9f5d368382d187f6d0
parent903ce168ca1ec9206a23aea66e9008346def74e2 (diff)
downloadopen-iov-6840a17b11f55b483ff6d80ed743465c99d420a3.tar.gz
open-iov-6840a17b11f55b483ff6d80ed743465c99d420a3.zip
sema-svc: diagnostics for GR counter release/publish paths
-rw-r--r--kernel/gsp_sema_service.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index d4cab22..b9cb40b 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -351,6 +351,9 @@ struct sema_svc {
u64 releases_jumped; /* applied with gap > 1 */
u64 releases_faked; /* skipped-entry fallback */
u64 counter_rel_applied; /* releases to registered counters */
+ u64 counter_pub_calls; /* publishes that found a registered counter */
+ u64 gr_rel_applied; /* release writes into the GR counter page */
+ u64 gr_rel_log;
u64 builds;
u64 gpfifo_entries_done; /* entries consumed via GPFIFO */
u64 gpfifo_nomap; /* GPFIFO/pushbuf VA not mapped */
@@ -1773,6 +1776,8 @@ static void svc_rebuild(struct nv_vgpu_device *vgpu)
svc.memsets_fail, svc.ring_ops, svc.ops_denied,
svc.false_trans, svc.gpfifo_skipped, svc.releases_faked,
svc.counter_rel_applied);
+ pr_info("sema-svc: counter pub_calls=%llu gr_rel=%llu\n",
+ svc.counter_pub_calls, svc.gr_rel_applied);
pr_info("sema-svc: gpfifo done=%llu nomap=%llu vidmem_writes=%llu ring_auto=%u pb=%u/%u pins=%u/%llu ipins=%u/%llu\n",
svc.gpfifo_entries_done, svc.gpfifo_nomap,
svc.vidmem_writes, svc_ring_n, svc_pb_n, svc_pb_passes,
@@ -2561,6 +2566,16 @@ static void svc_decode_stream(struct nv_vgpu_device *vgpu, const u8 *buf,
if (!svc_sem_write(vgpu, sem_va, cur)) {
svc.releases_applied++;
svc.post_hint_until = jiffies + 10 * HZ;
+ if (ch_eng == 0 &&
+ sem_va >= 0x204000000ULL &&
+ sem_va < 0x204100000ULL) {
+ svc.gr_rel_applied++;
+ if (svc.gr_rel_log < 48) {
+ svc.gr_rel_log++;
+ pr_info("sema-chan: gr release h=0x%x va=0x%llx pay=%u\n",
+ ch_h, sem_va, cur);
+ }
+ }
}
}
@@ -3881,6 +3896,7 @@ static void svc_counter_publish(struct nv_vgpu_device *vgpu,
if (!ch->counter_pa)
return;
+ svc.counter_pub_calls++;
val = put;
if (val == ch->counter_last)