From 6d5131e87a2c9cb5c20437669c1917f7be6252b5 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 29 Sep 2026 16:14:12 -0400 Subject: sema-svc: persist GR counter slot per channel; stable slot layout; bulk pin queue 4k - counter_pa autoreg result is written back to the channel table so later passes cannot re-target a different slot when the live GR count changes during teardown; re-registration of the same channel preserves the slot. - counter slot layout uses the max GR count ever seen in the generation instead of the shrinking live count. - sema_map_add queue 64 -> 4096 entries so a full-window pin burst drains without ENOSPC retries. - pin_gr_stream: one batched sudo pass per flush (was one process per run, ~4 s for 400 runs), retrying only queue-rejected runs. - semfix_uvmt: SEMFIX_SKIP_PB=1 skips the blocking push-buffer chain walk when the vsock window stream already supplies those pages. --- tools/guest-diag/semfix_uvmt.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/guest-diag/semfix_uvmt.py') diff --git a/tools/guest-diag/semfix_uvmt.py b/tools/guest-diag/semfix_uvmt.py index 02d4f9e..fd58299 100755 --- a/tools/guest-diag/semfix_uvmt.py +++ b/tools/guest-diag/semfix_uvmt.py @@ -43,6 +43,11 @@ COUNTER_LO = int(os.environ.get("COUNTER_LO", "0x20400f000"), 16) COUNTER_HI = int(os.environ.get("COUNTER_HI", "0x204010000"), 16) SEMSTREAM = os.environ.get("SEM_STREAM_FILE", "/tmp/opencode/sem_stream.txt") TRACE_EVERY = int(os.environ.get("UVMT_TRACE_EVERY", "5")) +# The push-buffer resolution walks the channel/pool/manager chain with many +# QMP reads and can block the poller for tens of seconds. When the GR window +# stream (pin_gr_stream.py) already supplies the push-buffer pages, skip it so +# the tracking-sem poller stays live during the client's deadline window. +SKIP_PB = os.environ.get("SEMFIX_SKIP_PB", "0") == "1" class Stream: @@ -309,6 +314,8 @@ def main(): ok = pin(gv, gpa) log("semfix: sem=0x%x pool va=0x%x -> gpa=0x%x pin=%s" % (sem, gv, gpa, "ok" if ok else "FAILED")) + if SKIP_PB: + continue d = {} try: res = resolve_from_sem(q, sem, d) -- cgit v1.2.3