From d3e35752e8d78a368940fc262b0013e1d50deed4 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 30 Sep 2026 12:54:11 -0400 Subject: 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. --- kernel/gsp_sema_service.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'kernel/gsp_sema_service.h') 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 @@ -79,6 +79,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; -- cgit v1.2.3