From a9916e3ad37eb03ebe0d764729e4c9c51fda3fcc Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 30 Sep 2026 05:58:38 -0400 Subject: sema-svc: run CE work before its release, grace unreadable CE entries, payload-pattern audit - CE LAUNCH_DMA releases are now applied after the push's collected work runs: the client reads copied data as soon as it observes the release, so release-first let cuMemcpyDtoH observe a copy that had not executed. - Unreadable CE entries stay pending for a grace window (sema_ce_grace_ms, default 8s) before the release fallback consumes them, so a translation that lands within a service pass lets the push be decoded and its work executed instead of being dropped. - sema_copy_pat matches an 8-byte value against every copy's src/dst first word and scans decoded pushes for it, naming the submission that carries a known payload regardless of size/encoding. - sema-dma-skip logs transfer-shaped launches that collect no op; op log lines carry the channel handle; LAUNCH_DMA inventory follows OPS_LOG. - A real release application now records the release VA, so decoded pushes no longer trigger a spurious fake release. --- kernel/main.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'kernel/main.c') diff --git a/kernel/main.c b/kernel/main.c index efa4bf7..7fe2d15 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -2465,6 +2465,25 @@ MODULE_PARM_DESC(sema_ops_log, "Max executed CE ops logged with operands (defaul module_param_named(sema_copy_watch, gsp_sema_copy_watch, uint, 0644); MODULE_PARM_DESC(sema_copy_watch, "Copy size whose first bytes are logged (default 0)"); +/* + * Data-path watch: 8-byte value matched against every CE copy's first source + * and destination words, and scanned for inside every decoded push, so the + * submission carrying a known payload is named even when its size/encoding is + * unknown: + * echo 0x0000000400000001 > .../parameters/sema_copy_pat + */ +module_param_named(sema_copy_pat, gsp_sema_copy_pat, ullong, 0644); +MODULE_PARM_DESC(sema_copy_pat, "8-byte pattern matched in copy src/dst and pushes (default 0)"); + +/* + * Grace window (ms) an untranslatable CE entry stays pending before the + * fallback acknowledges its release and consumes it. Its work must run before + * the release the client synchronizes on; the translation usually lands within + * a service pass. + */ +module_param_named(sema_ce_grace_ms, gsp_sema_ce_grace_ms, uint, 0644); +MODULE_PARM_DESC(sema_ce_grace_ms, "CE pending-entry grace window in ms (default 8000)"); + /* * Grace window (ms) an untranslatable GR entry stays pending before the pump * consumes it as stale, so a late push-buffer pin can still make it readable. -- cgit v1.2.3