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
commitfdeb1d4ba62283210dc259141da4da024bd1cc77 (patch)
tree830c3b759238d37eeb24d2bde22454f5e70acaa2 /tools/guest-diag/semfix_watch.py
parenta83a42df71c235c5f9f8eaeb3b62053a75fe30c7 (diff)
downloadopen-iov-fdeb1d4ba62283210dc259141da4da024bd1cc77.tar.gz
open-iov-fdeb1d4ba62283210dc259141da4da024bd1cc77.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"