mbox series

[v3,0/2] KVM: selftests: Calculate memory latency stats

Message ID 20230327212635.1684716-1-coltonlewis@google.com (mailing list archive)
Headers show
Series KVM: selftests: Calculate memory latency stats | expand

Message

Colton Lewis March 27, 2023, 9:26 p.m. UTC
Sample the latency of memory accesses in dirty_log_perf_test and
report summary stats to give a picture of the latency
distribution. Specifically, focus on the right tail with the 50th,
90th, and 99th percentile reported in ns.

v3:
* Move timing functions to lib/$ARCH/processor.c
* Add memory barriers to prevent reordering measured memory accesses
* Remove floating point from conversion functions
* Change command line flag to -l for latency and provide help summary
* Do not show latency measurements unless -l is given with argument
* Change output formatting to seconds for consistency with other output

v2: https://lore.kernel.org/kvm/20230316222752.1911001-1-coltonlewis@google.com/

v1: https://lore.kernel.org/kvm/20221115173258.2530923-1-coltonlewis@google.com/

Colton Lewis (2):
  KVM: selftests: Provide generic way to read system counter
  KVM: selftests: Print summary stats of memory latency distribution

 .../selftests/kvm/access_tracking_perf_test.c |  3 +-
 .../selftests/kvm/demand_paging_test.c        |  2 +-
 .../selftests/kvm/dirty_log_perf_test.c       | 21 +++++-
 .../selftests/kvm/include/aarch64/processor.h | 13 ++++
 .../testing/selftests/kvm/include/memstress.h | 10 ++-
 .../selftests/kvm/include/x86_64/processor.h  | 13 ++++
 .../selftests/kvm/lib/aarch64/processor.c     | 12 ++++
 tools/testing/selftests/kvm/lib/memstress.c   | 68 ++++++++++++++++---
 .../selftests/kvm/lib/x86_64/processor.c      | 13 ++++
 .../kvm/memslot_modification_stress_test.c    |  2 +-
 .../kvm/system_counter_offset_test.c          | 10 +--
 11 files changed, 143 insertions(+), 24 deletions(-)

--
2.40.0.348.gf938b09366-goog