KVM: selftests: Reduce PMC test runtime by ~17x
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 3 repliesIn review
- v22 patches 1 replySuperseded
- v12 patches 1 replySuperseded
Changes in v3 from the cover letter
- Allocate an array of vCPU pointers, not an array of vCPUs. [Sashiko]
- Fix a copy+paste goof that caused the GP counters test to always run with the maximum number of GP counters. [Sashiko]
- Fix a (benign) off-by-one error in the arch events tests. [Sashiko]
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: selftests: Test one random GP counter in PMU arch events testcasetools/ tools/ tools/ | +28 | 0 replies | |
| 2/2 | KVM: selftests: Create one VM with many vCPUs for each major PMU counters testtools/ | +121 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] KVM: selftests: Reduce PMC test runtime by ~17x
Reduce the runtime of the PMU counters test on an Emerald Rapids system from ~85 seconds to ~5 seconds by (a) testing one random GP counter in the arch events test instead of every GP counter and (b) creating one large VM per "major" test and then running each subtest with a different vCPUs, versus creating a new single-vCPU VM for every subtest.
AFAICT, there aren't any bugs anywhere in the VM creation flow, there's just a lot of work to be done. And VM creation isn't even that slow, but creating something like 1000+ VMs for the test adds up.
v3:
- Allocate an array of vCPU pointers, not an array of vCPUs. [Sashiko]
- Fix a copy+paste goof that caused the GP counters test to always run with the maximum number of GP counters. [Sashiko]
- Fix a (benign) off-by-one error in the arch events tests. [Sashiko]
v2:
- Fail hard. Pretend this version doesn't exist.
- https://lore.kernel.org/all/[email protected]
v1: https://lore.kernel.org/all/[email protected]
Sean Christopherson (2):
KVM: selftests: Test one random GP counter in PMU arch events testcase
KVM: selftests: Create one VM with many vCPUs for each major PMU
counters test
.../testing/selftests/kvm/include/test_util.h | 4 +- tools/testing/selftests/kvm/lib/test_util.c | 22 +- .../selftests/kvm/x86/pmu_counters_test.c | 229 ++++++++++-------- 3 files changed, 149 insertions(+), 106 deletions(-)
base-commit: 2dfab80a305700a45bd947350dae253ba4e30c41
Signature · 1 line
2.55.0.571.g244d577d93-goog