selftests/resctrl: Add Cache Allocation Technology (CAT) selftest
authorFenghua Yu <fenghua.yu@intel.com>
Thu, 16 Jan 2020 21:32:42 +0000 (13:32 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 11 Feb 2020 01:43:07 +0000 (18:43 -0700)
commit790bf585b0eeec9aa0e680ba090142b98da7f948
treef1b40393432f99083d2ab610c9ebb3cf541b6e34
parent78941183d1b151317beb37b25690b7d87fe2596d
selftests/resctrl: Add Cache Allocation Technology (CAT) selftest

Cache Allocation Technology (CAT) selftest allocates a portion of
last level cache and starts a benchmark to read each cache
line in this portion of cache. Measure the cache misses in perf and
the misses should be equal to the number of cache lines in this
portion of cache.

We don't use CQM to calculate cache usage because some CAT enabled
platforms don't have CQM.

Co-developed-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Co-developed-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cache.c
tools/testing/selftests/resctrl/cat_test.c [new file with mode: 0644]
tools/testing/selftests/resctrl/fill_buf.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_tests.c
tools/testing/selftests/resctrl/resctrlfs.c