Skip to content

KVM: selftests: pmu_counters_test: increase robustness of LLC cache misses

Maxim Levitsky kvm linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1KVM: selftests: pmu_counters_test: increase robustness of LLC cache missestools/testing/selftests/kvm/x86_64/pmu_counters_test.c+9 -113 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] KVM: selftests: pmu_counters_test: increase robustness of LLC cache misses

Recent CI failures brought my attention to the fact that pmu_counters_test sometimes fails because it doesn't get any LLC cache misses.

It apparently happens because CLFLUSH can race with CPU prediction.

To attempt to fix this, implement a more aggressive cache flushing - now it is flushed on each iteration of the measured loop which should at least reduce by order of magnitude the chance of this happening.

This patch survived more that a day of running in a loop on a Comet Lake machine, where the test used to fail after about 10-20 minites.

Best regards,
Maxim Levitsky

Maxim Levitsky (1):
KVM: selftests: pmu_counters_test: increase robustness of LLC cache
misses

 .../selftests/kvm/x86_64/pmu_counters_test.c  | 20 +++++++++----------
 1 file changed, 9 insertions(+), 11 deletions(-)
Signature · 1 line
2.26.3