mbox series

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

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

Message

Colton Lewis Sept. 8, 2022, 8:53 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.

v4:

Ensure all randomization is off for the populate phase (write_percent
= 100 and random_access = false).

Move random number generator to test_util.{c,h} and rename to
guest_random. Make it destructively modify its argument to cover the
most common (probably only) use case.

Make the perf_test_set* functions more efficient by only syncing the
field they change.

Improve style and consistency.

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       | 49 +++++++++++++------
 .../selftests/kvm/include/perf_test_util.h    |  8 ++-
 .../testing/selftests/kvm/include/test_util.h |  2 +
 .../selftests/kvm/lib/perf_test_util.c        | 30 +++++++++---
 tools/testing/selftests/kvm/lib/test_util.c   |  9 ++++
 6 files changed, 75 insertions(+), 25 deletions(-)

--
2.37.2.789.g6183377224-goog