summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/resctrl_val.c
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2020-01-17 00:32:39 +0300
committerShuah Khan <skhan@linuxfoundation.org>2020-02-11 04:42:29 +0300
commitecdbb911f22d6cc5d422571dedf048b889d71417 (patch)
treefec76c9957f0335f20c5a4a5ad0ae5d3efe8afac /tools/testing/selftests/resctrl/resctrl_val.c
parenta2561b12fe392e0024e3187d325dbcbde7b99c04 (diff)
downloadlinux-ecdbb911f22d6cc5d422571dedf048b889d71417.tar.xz
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>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrl_val.c')
-rw-r--r--tools/testing/selftests/resctrl/resctrl_val.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c
index 0d1bd03ec4be..4f7bd5a4d86e 100644
--- a/tools/testing/selftests/resctrl/resctrl_val.c
+++ b/tools/testing/selftests/resctrl/resctrl_val.c
@@ -435,6 +435,8 @@ pid_t bm_pid, ppid;
static void ctrlc_handler(int signum, siginfo_t *info, void *ptr)
{
kill(bm_pid, SIGKILL);
+ umount_resctrlfs();
+ tests_cleanup();
printf("Ending\n\n");
exit(EXIT_SUCCESS);