diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-09-02 17:16:22 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-11 09:35:49 -0700 |
| commit | 3a2a37d2d48e6844dde61032faf130400fad5312 (patch) | |
| tree | 12097c2b8f31022aa99b0dda1e91c77bcb61436a /tools/perf/scripts/python/flamegraph.py | |
| parent | d2dde5c387fc9ae1b9364c1bc096bac5d419756f (diff) | |
KVM: selftests: Compute node masks on-demand in xAPIC IPI test
Compute the node masks for the source (from) and destination (to) NUMA
nodes in the xAPIC IPI test instead of pre-filling an array of masks with
node per mask. Computing the mask on-demand is technically slower, but
doesn't require a large-ish on-stack array, and more importantly allows the
test to use a generic "get next NUMA node" API without having to commit all
of KVM selftests to using a large array of single-bit nodemasks.
Implement said API as a common KVM NUMA API so that it can be used by other
tests, e.g. in guest_memfd tests. Deliberately make @from "exclusive" as
the anticipated usage in KVM selftests is to select the next, *different*
node, i.e. so that users don't have to copy+paste code to assert that the
found node is different than the starting node. The obvious downside is
that implementing the exclusive logic forces callers to pass -1 instead of
0 when the goal is to find the first node in the mask, but that arguably
yields more intuitive code anyways.
From an overall test functionality/coverage perspective, no functional
change intended (the walking pattern of node migration should be unchanged).
Reviewed-by: Shivank Garg <shivankg@amd.com>
Link: https://patch.msgid.link/20260903001625.2792367-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
