From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/2] KVM: selftests: Reduce PMC test runtime by ~17x
Date: Tue, 4 Aug 2026 14:00:44 -0700 [thread overview]
Message-ID: <20260804210046.3413149-1-seanjc@google.com> (raw)
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/20260804204048.3401810-1-seanjc@google.com
v1: https://lore.kernel.org/all/20260804173437.3339269-1-seanjc@google.com
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
--
2.55.0.571.g244d577d93-goog
next reply other threads:[~2026-08-04 21:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 21:00 Sean Christopherson [this message]
2026-08-04 21:00 ` [PATCH v3 1/2] KVM: selftests: Test one random GP counter in PMU arch events testcase Sean Christopherson
2026-08-04 21:00 ` [PATCH v3 2/2] KVM: selftests: Create one VM with many vCPUs for each major PMU counters test Sean Christopherson
2026-08-04 21:12 ` sashiko-bot
2026-08-04 21:21 ` Sean Christopherson
2026-08-07 16:25 ` [PATCH v3 0/2] KVM: selftests: Reduce PMC test runtime by ~17x Sean Christopherson
2026-08-10 16:36 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260804210046.3413149-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.