]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/resctrl: Simplify mem bandwidth file code for MBA & MBM tests
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 10 Jun 2024 15:14:49 +0000 (18:14 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Jul 2024 17:23:54 +0000 (11:23 -0600)
commit711d27b05a97cd5c8e62c858c2c940d79f8445e1
treef5af63e38aab9debf4fdf77d2ec24969c452c187
parentbc074b6321d73295dcfe8c450c8f5245c530bb4e
selftests/resctrl: Simplify mem bandwidth file code for MBA & MBM tests

initialize_mem_bw_resctrl() and set_mbm_path() contain complicated set
of conditions, each yielding different file to be opened to measure
memory bandwidth through resctrl FS. In practice, only two of them are
used. For MBA test, ctrlgrp is always provided, and for MBM test both
ctrlgrp and mongrp are set.

The file used differ between MBA/MBM test, however, MBM test
unnecessarily create monitor group because resctrl FS already provides
monitoring interface underneath any ctrlgrp too, which is what the MBA
selftest uses.

Consolidate memory bandwidth file used to the one used by the MBA
selftest. Remove all unused branches opening other files to simplify
the code.

Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/mbm_test.c
tools/testing/selftests/resctrl/resctrl_val.c