diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-08-04 14:00:46 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-08-10 08:04:13 -0700 |
| commit | 4fe8b4e1545a0179ceebe098cce0dcfe9134a6cd (patch) | |
| tree | 3a029c1771f2d76dbb783505499e728171cf5b99 /include | |
| parent | a53d1602e3bfe7baf63aaa28c1ffafb0c8db49ae (diff) | |
KVM: selftests: Create one VM with many vCPUs for each major PMU counters test
To reduce the runtime of the PMU counters test by an order of magnitude,
create one VM per category of test (arch events, GP PMCs, fixed PMCs),
with N vCPUs per VM, where 'N' is the number of testscases to run per
category. The vast majority of the test's runtime is spent creating VMs,
because while creating a VM only takes a few milliseconds, the total time
adds up when creating hundreds of VMs. The only reason the test creates
so many VMs is because KVM disallows changing the virtual PMU model after
a vCPU runs, so rather than create an entirely new VM just to get a "fresh"
vCPUs, simply use a different vCPU.
On an Emerald Rapids host, this reduces the runtime from 75+ seconds to
less than 6 seconds.
Opportunistically fix a typo in the comment about unavailable_masks pointed
out by Like Xu[1].
Link: https://lore.kernel.org/all/20260625090155.6326-1-likexu@tencent.com[1]
Link: https://patch.msgid.link/20260804210046.3413149-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
