| From: |
| Leonardo Bras <leo.bras-AT-arm.com> |
| To: |
| Paolo Bonzini <pbonzini-AT-redhat.com>, Shuah Khan <shuah-AT-kernel.org>, Sean Christopherson <seanjc-AT-google.com>, David Matlack <dmatlack-AT-google.com>, Leonardo Bras <leo.bras-AT-arm.com>, Ackerley Tng <ackerleytng-AT-google.com>, Oliver Upton <oupton-AT-kernel.org>, Marc Zyngier <maz-AT-kernel.org>, Wu Fei <wu.fei9-AT-sanechips.com.cn>, Steffen Eiden <seiden-AT-linux.ibm.com>, Claudio Imbrenda <imbrenda-AT-linux.ibm.com> |
| Subject: |
| [RFC PATCH v2 0/3] KVM: selftests: Improvements on dirty-ring |
| Date: |
| Mon, 29 Jun 2026 11:59:39 +0100 |
| Message-ID: |
| <20260629105950.1790259-1-leo.bras@arm.com> |
| Cc: |
| kvm-AT-vger.kernel.org, linux-kselftest-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org |
| Archive-link: |
| Article |
Add support to dirty-ring on dirty_log_perf_test, so we can measure
performance differences when we change / improve the mechanism.
One major conflict I had in this set is that dirty-ring needs to be
enabled after the VM was created, but before any cpu is created, so
for that, I made a few changes on memstress so it can actually take
dirty-ring size as a parameter for VM creation. (Patch #1)
I honestly don't think it's pretty, but I could not think on a
better way of doing this without messing too much in the code.
Also added some checks in dirty-ring enable, so an error message on
ring size is more informative.
Please provide feedback :)
Thanks!
Leo
Changes since RFCv1:
- Stuff reported by Sashiko
- Fixed elements / byte size wrapping issue
- Removed element count due to concurrency
- Testing exit_reason instead of ioctl return value
- Some nits
Link: https://lore.kernel.org/all/20260624171656.1737580-1-leo....
Leonardo Bras (3):
KVM: selftests: memstress: Add option to enable dirty-ring on VM
creation
KVM: selftests: Check dirty-ring size before enabling
KVM: selftests: dirty_log_perf_test: Add dirty-ring support
.../testing/selftests/kvm/include/memstress.h | 3 +-
.../selftests/kvm/access_tracking_perf_test.c | 2 +-
.../selftests/kvm/demand_paging_test.c | 2 +-
.../selftests/kvm/dirty_log_perf_test.c | 95 +++++++++++++++++--
tools/testing/selftests/kvm/lib/kvm_util.c | 19 +++-
tools/testing/selftests/kvm/lib/memstress.c | 34 ++++++-
.../kvm/memslot_modification_stress_test.c | 2 +-
.../kvm/x86/dirty_log_page_splitting_test.c | 2 +-
8 files changed, 137 insertions(+), 22 deletions(-)
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
--
2.54.0