summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag/semfix_watch.py
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 14:47:17 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 14:47:17 -0400
commit0cbe5604adff2bc386960edbc58f45e35e61bae8 (patch)
treed5b803fffddd5ab201254a40ec8a5138d65b38f7 /tools/guest-diag/semfix_watch.py
parentfa31d766d548a0e07426b6d231a42f05c07521a8 (diff)
downloadopen-iov-0cbe5604adff2bc386960edbc58f45e35e61bae8.tar.gz
open-iov-0cbe5604adff2bc386960edbc58f45e35e61bae8.zip
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.
Diffstat (limited to 'tools/guest-diag/semfix_watch.py')
-rw-r--r--tools/guest-diag/semfix_watch.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/guest-diag/semfix_watch.py b/tools/guest-diag/semfix_watch.py
index 400fafe..347da5e 100644
--- a/tools/guest-diag/semfix_watch.py
+++ b/tools/guest-diag/semfix_watch.py
@@ -145,7 +145,8 @@ def guest_trace():
Read *before* clearing: the create-time probes fire once per client and
would be wiped by a clear that races them.
"""
- inner = ("grep -E \"uvmt|uvch|uvbp|uvpbf\" /sys/kernel/tracing/trace "
+ inner = ("tail -c 131072 /sys/kernel/tracing/trace "
+ "| grep -E \"uvmt|uvch|uvbp|uvpbf\" "
"| tail -400")
if not os.environ.get("KEEP_TRACE"):
inner += "; echo > /sys/kernel/tracing/trace"