Hi all,
Here's a series to improve resctrl selftests. It contains following improvements:
- Excludes shareable bits from CAT test allocation to avoid interference - Alters read pattern to defeat HW prefetcher optimizations - Rewrites CAT test to make the CAT test reliable and truly measure if CAT is working or not - Introduces generalized test framework making easier to add new tests - Adds L2 CAT test - Lots of other cleanups & refactoring
The patches up to CAT test rewrite have been earlier on the mailing list. I've tried to address all the comments made against them back then.
This series have been tested across a large number of systems from different generations.
Ilpo Järvinen (24): selftests/resctrl: Split fill_buf to allow tests finer-grained control selftests/resctrl: Refactor fill_buf functions selftests/resctrl: Refactor get_cbm_mask() selftests/resctrl: Mark get_cache_size() cache_type const selftests/resctrl: Create cache_size() helper selftests/resctrl: Exclude shareable bits from schemata in CAT test selftests/resctrl: Split measure_cache_vals() function selftests/resctrl: Split show_cache_info() to test specific and generic parts selftests/resctrl: Remove unnecessary __u64 -> unsigned long conversion selftests/resctrl: Remove nested calls in perf event handling selftests/resctrl: Consolidate naming of perf event related things selftests/resctrl: Improve perf init selftests/resctrl: Convert perf related globals to locals selftests/resctrl: Move cat_val() to cat_test.c and rename to cat_test() selftests/resctrl: Read in less obvious order to defeat prefetch optimizations selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test selftests/resctrl: Create struct for input parameter selftests/resctrl: Introduce generalized test framework selftests/resctrl: Pass write_schemata() resource instead of test name selftests/resctrl: Add helper to convert L2/3 to integer selftests/resctrl: Get resource id from cache id selftests/resctrl: Add test groups and name L3 CAT test L3_CAT selftests/resctrl: Add L2 CAT test selftests/resctrl: Ignore failures from L2 CAT test with <= 2 bits
tools/testing/selftests/resctrl/cache.c | 263 +++--------- tools/testing/selftests/resctrl/cat_test.c | 386 ++++++++++++------ tools/testing/selftests/resctrl/cmt_test.c | 72 +++- tools/testing/selftests/resctrl/fill_buf.c | 114 +++--- tools/testing/selftests/resctrl/mba_test.c | 24 +- tools/testing/selftests/resctrl/mbm_test.c | 26 +- tools/testing/selftests/resctrl/resctrl.h | 102 ++++- .../testing/selftests/resctrl/resctrl_tests.c | 202 ++++----- tools/testing/selftests/resctrl/resctrl_val.c | 6 +- tools/testing/selftests/resctrl/resctrlfs.c | 234 +++++++---- 10 files changed, 807 insertions(+), 622 deletions(-)