diff options
| author | Reinette Chatre <reinette.chatre@intel.com> | 2024-10-24 14:18:44 -0700 |
|---|---|---|
| committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-11-04 17:02:03 -0700 |
| commit | f3069136c95f15c05d166281cbb55f0509a42ae1 (patch) | |
| tree | 52c015aec8231ab7bed3361ab5c51723bc653220 /tools/testing/selftests/resctrl/resctrl_tests.c | |
| parent | efffa8c40166af680959c030a815afa8d06af66a (diff) | |
| download | lwn-f3069136c95f15c05d166281cbb55f0509a42ae1.tar.gz lwn-f3069136c95f15c05d166281cbb55f0509a42ae1.zip | |
selftests/resctrl: Remove "once" parameter required to be false
The CMT, MBM, and MBA tests rely on a benchmark that runs while
the test makes changes to needed configuration (for example memory
bandwidth allocation) and takes needed measurements. By default
the "fill_buf" benchmark is used and by default (via its
"once = false" setting) "fill_buf" is configured to run until
terminated after the test completes.
An unintended consequence of enabling the user to override the
benchmark also enables the user to change parameters to the
"fill_buf" benchmark. This enables the user to set "fill_buf" to
only cycle through the buffer once (by setting "once = true")
and thus breaking the CMT, MBA, and MBM tests that expect
workload/interference to be reflected by their measurements.
Prevent user space from changing the "once" parameter and ensure
that it is always false for the CMT, MBA, and MBM tests.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrl_tests.c')
| -rw-r--r-- | tools/testing/selftests/resctrl/resctrl_tests.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c index ecbb7605a981..e7878077883f 100644 --- a/tools/testing/selftests/resctrl/resctrl_tests.c +++ b/tools/testing/selftests/resctrl/resctrl_tests.c @@ -266,8 +266,13 @@ last_arg: uparams.benchmark_cmd[1] = span_str; uparams.benchmark_cmd[2] = "1"; uparams.benchmark_cmd[3] = "0"; - uparams.benchmark_cmd[4] = "false"; - uparams.benchmark_cmd[5] = NULL; + /* + * Fourth parameter was previously used to indicate + * how long "fill_buf" should run for, with "false" + * ("fill_buf" will keep running until terminated) + * the only option that works. + */ + uparams.benchmark_cmd[4] = NULL; } ksft_set_plan(tests); |
