summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-30 12:54:11 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-30 12:54:11 -0400
commit7d21a9fa1e7798e1a4d2938ebee307f6da6e4c74 (patch)
tree69afd697c2264f628fc923635265f89556843854 /kernel/gsp_sema_service.h
parent97593bcf4b451f94b9ae8ebacd150f4098432ff2 (diff)
downloadopen-iov-7d21a9fa1e7798e1a4d2938ebee307f6da6e4c74.tar.gz
open-iov-7d21a9fa1e7798e1a4d2938ebee307f6da6e4c74.zip
sema-svc: gate per-push/per-doorbell/RPC tracing behind default-off sema_dbg
A healthy run left dmesg dominated by per-operation lines (sema-push, sema-lda, sema-chan rel-apply, sema-grce, DOORBELL/BAR writes, GSPRM per-RPC lines, the teardown garbage-element stream). Introduce the module parameter sema_dbg (default 0) and route every high-frequency diagnostic through it; the finer-grained watch knobs (sema_ops_log, sema_copy_watch, sema_copy_pat, sema_copy_dst, sema_copy_dst2) only take effect while it is on. Boot stats, channel registrations, pin events and state changes stay unconditional. Also carries the per-side translation provenance (op_tr_src, printed as prov= in the destination-window watch) and the 16 KB destination window used to observe the guest's page-table writes. Verified: fresh boot + full cdt2 smoke test (64/64, ALL OK) leaves a 520-line dmesg with zero per-push/per-doorbell/per-RPC lines.
Diffstat (limited to 'kernel/gsp_sema_service.h')
-rw-r--r--kernel/gsp_sema_service.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.h b/kernel/gsp_sema_service.h
index 51397b9..baed3cf 100644
--- a/kernel/gsp_sema_service.h
+++ b/kernel/gsp_sema_service.h
@@ -80,6 +80,13 @@ extern bool gsp_sema_gr_rings;
extern bool gsp_sema_fake_rel;
/*
+ * Master diagnostic switch for the per-push/per-doorbell/per-op tracing
+ * (module parameter sema_dbg). Off by default so a healthy boot leaves the
+ * kernel log quiet; the watch knobs below only take effect while it is on.
+ */
+extern bool gsp_sema_dbg;
+
+/*
* Skip executing a push's collected work (CE memsets/copies) while still
* applying its release; see the definition for the trade-off.
*/
@@ -103,6 +110,9 @@ extern u64 gsp_sema_copy_pat;
/* Data-path watch: dump copies landing in this page (source bytes). */
extern u64 gsp_sema_copy_dst;
+/* Second destination window for the same watch (0 = off). */
+extern u64 gsp_sema_copy_dst2;
+
/* CE pending-entry grace window in ms before the release fallback fires. */
extern unsigned gsp_sema_ce_grace_ms;