]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/resctrl: Add MBM test
authorFenghua Yu <fenghua.yu@intel.com>
Thu, 16 Jan 2020 21:32:39 +0000 (13:32 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 11 Feb 2020 01:42:29 +0000 (18:42 -0700)
commit1abb1106475db64dc74dfbc963c78b778207befa
treefec76c9957f0335f20c5a4a5ad0ae5d3efe8afac
parenta0ccd5372f3ad5c4f105f931d1f2dd263b4bcdb3
selftests/resctrl: Add MBM test

MBM (Memory Bandwidth Monitoring) test is the first implemented selftest.
It starts a stressful memory bandwidth benchmark and assigns the
bandwidth pid in a resctrl monitoring group. Read and compare perf IMC
counter and MBM total bytes for the benchmark. The numbers should be
close enough to pass the test.

Default benchmark is built-in fill_buf. But users can specify their
own benchmark by option "-b".

We can add memory bandwidth monitoring for multiple processes in the
future.

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/Makefile
tools/testing/selftests/resctrl/mbm_test.c [new file with mode: 0644]
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_tests.c [new file with mode: 0644]
tools/testing/selftests/resctrl/resctrl_val.c
tools/testing/selftests/resctrl/resctrlfs.c