OSDN Git Service

KVM: selftests: randomize page access order
authorColton Lewis <coltonlewis@google.com>
Mon, 7 Nov 2022 18:22:08 +0000 (18:22 +0000)
committerSean Christopherson <seanjc@google.com>
Wed, 16 Nov 2022 18:57:22 +0000 (10:57 -0800)
commitc967a4752ac66cc0ef8c0b1f4914151ca8758709
tree623ba8abeeee88b27b7484ff7ab7fd349df4e948
parent6864c6442f4dfa02c7cf48199cf3ea6bb1fe74ed
KVM: selftests: randomize page access order

Create the ability to randomize page access order with the -a
argument. This includes the possibility that the same pages may be hit
multiple times during an iteration or not at all.

Population has random access as false to ensure all pages will be
touched by population and avoid page faults in late dirty memory that
would pollute the test results.

Signed-off-by: Colton Lewis <coltonlewis@google.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20221107182208.479157-5-coltonlewis@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/dirty_log_perf_test.c
tools/testing/selftests/kvm/include/perf_test_util.h
tools/testing/selftests/kvm/lib/perf_test_util.c