mbox series

[v7,0/3] KVM: selftests: randomize memory access of dirty_log_perf_test

Message ID 20221019221321.3033920-1-coltonlewis@google.com (mailing list archive)
Headers show
Series KVM: selftests: randomize memory access of dirty_log_perf_test | expand

Message

Colton Lewis Oct. 19, 2022, 10:13 p.m. UTC
Add the ability to randomize parts of dirty_log_perf_test,
specifically the order pages are accessed and whether pages are read
or written.

v7:

Encapsulate the random state inside a struct. Add detail to names of
those functions. Change interface so random function returns the next
random number rather than using an out parameter.

Rebased to kvm/queue to ensure freshness.

Colton Lewis (3):
  KVM: selftests: implement random number generation for guest code
  KVM: selftests: randomize which pages are written vs read
  KVM: selftests: randomize page access order

 .../selftests/kvm/access_tracking_perf_test.c |  2 +-
 .../selftests/kvm/dirty_log_perf_test.c       | 58 ++++++++++++++-----
 .../selftests/kvm/include/perf_test_util.h    |  8 ++-
 .../testing/selftests/kvm/include/test_util.h |  7 +++
 .../selftests/kvm/lib/perf_test_util.c        | 32 ++++++++--
 tools/testing/selftests/kvm/lib/test_util.c   | 17 ++++++
 6 files changed, 100 insertions(+), 24 deletions(-)

--
2.38.0.413.g74048e4d9e-goog

Comments

Sean Christopherson Oct. 26, 2022, 9:13 p.m. UTC | #1
On Wed, Oct 19, 2022, Colton Lewis wrote:
> Add the ability to randomize parts of dirty_log_perf_test,
> specifically the order pages are accessed and whether pages are read
> or written.
> 
> v7:
> 
> Encapsulate the random state inside a struct. Add detail to names of
> those functions. Change interface so random function returns the next
> random number rather than using an out parameter.
> 
> Rebased to kvm/queue to ensure freshness.
> 
> Colton Lewis (3):
>   KVM: selftests: implement random number generation for guest code
>   KVM: selftests: randomize which pages are written vs read
>   KVM: selftests: randomize page access order

A few mechanical comments, but otherwise looks good.