summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-01-10 16:29:51 -0800
committerSean Christopherson <seanjc@google.com>2025-02-12 09:00:55 -0800
commit9b1feec83e1ab1cbab37232b8aab16301066336d (patch)
treefb67978d08509bc39806a7f15bb0e4c8ad293445 /tools/perf/scripts/python/task-analyzer.py
parentf2228aa083240f44794c3617d4a22134ab26217c (diff)
KVM: selftests: Continuously reap dirty ring while vCPU is running
Continue collecting entries from the dirty ring for the entire time the vCPU is running. Collecting exactly once all but guarantees the vCPU will encounter a "ring full" event and stop. While testing ring full is interesting, stopping and doing nothing is not, especially for larger intervals as the test effectively does nothing for a much longer time. To balance continuous collection with letting the guest make forward progress, chunk the interval waiting into 1ms loops (which also makes the math dead simple). To maintain coverage for "ring full", collect entries on subsequent iterations if and only if the ring has been filled at least once. I.e. let the ring fill up (if the interval allows), but after that contiuously empty it so that the vCPU can keep running. Opportunistically drop unnecessary zero-initialization of "count". Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20250111003004.1235645-8-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions