From fdeb1d4ba62283210dc259141da4da024bd1cc77 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 29 Sep 2026 14:47:17 -0400 Subject: guest-diag: cheaper trace read, optional push sampler, bigger pagemap batches Under load the semfix poll grepped the whole (growing) trace file and the track_waits push block spawned three guest processes per sample, both of which slowed the pin path into the client's failure window. The trace read now tails 128 KB; track_waits.sh gates the push dump behind PUSH=0; the pagemap helper reads 32 KB chunks. --- tools/guest-diag/track_waits.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'tools/guest-diag/track_waits.sh') diff --git a/tools/guest-diag/track_waits.sh b/tools/guest-diag/track_waits.sh index 45a9a66..6ae9154 100644 --- a/tools/guest-diag/track_waits.sh +++ b/tools/guest-diag/track_waits.sh @@ -16,6 +16,7 @@ PAGE_VA="${PAGE_VA:-0x20400f000}" COUNT="${COUNT:-20}" STRIDE="${STRIDE:-16}" OFFSET="${OFFSET:-0xec0}" +PUSH="${PUSH:-1}" : > /tmp/trk.log : > /tmp/cnt.log @@ -58,14 +59,16 @@ for i in $(seq 1 "$N"); do | grep -vE "^\[|Reading symbols|^0x[0-9a-f]+ in |warning:" >> /tmp/trk.log fi - { - echo "=== $TS push pages ===" - python3 /tmp/guest_pmap.py "$PID" 0x201000000 0x203400000 0x203400020 2>&1 - for va in 0x201000000 0x203400000 0x203400020; do - echo "--- $va" - timeout 5 python3 /tmp/read_va.py "$PID" "$va" 64 --u32 2>&1 - done - } >> /tmp/push.log + if [ "$PUSH" = "1" ]; then + { + echo "=== $TS push pages ===" + python3 /tmp/guest_pmap.py "$PID" 0x201000000 0x203400000 0x203400020 2>&1 + for va in 0x201000000 0x203400000 0x203400020; do + echo "--- $va" + timeout 5 python3 /tmp/read_va.py "$PID" "$va" 64 --u32 2>&1 + done + } >> /tmp/push.log + fi sleep "$SLEEP" done -- cgit v1.2.3