From 52d996d4aa54468354435394277bdd86fad9a9bc Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 13 Nov 2026 18:46:49 -0500 Subject: [PATCH] Count the low-latency driver's sleep as pacing on whichever thread acquires, as the other acquire waits are counted since the pacing timing changed: vk_lowlat.c frame_begin runs on the acquiring thread, which need not be the one that presents, and perf_end dropped a wait made there. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_lowlat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/vk_lowlat.c b/runtime/vk_lowlat.c index 474904fd..0c46ec7d 100644 --- a/runtime/vk_lowlat.c +++ b/runtime/vk_lowlat.c @@ -267,7 +267,7 @@ static void frame_begin(uint64_t id, int at_input) { uint64_t p0 = perf_begin(); if (L.kind == LL_NV) nv_sleep(); else STORE(&L.staged[id % RING], id), amd_stage(VK_ANTI_LAG_STAGE_INPUT_AMD, id); - perf_end(PERF_PACE, p0); + perf_end_any(PERF_PACE, p0); // the acquiring thread may not be the one that presents kern_core_back(&away); __atomic_add_fetch(&L.sleep_ns, kern_now_ns() - t0, __ATOMIC_RELAXED); __atomic_add_fetch(&L.n_sleep, 1, __ATOMIC_RELAXED);