Commit bc074b63 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Shuah Khan

selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() & document

measure_vals() is awfully generic name so rename it to measure_mem_bw()
to describe better what it does and document the function parameters.
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: default avatarBabu Moger <babu.moger@amd.com>
Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent b0bd742a
...@@ -632,12 +632,17 @@ static void initialize_llc_occu_resctrl(const char *ctrlgrp, const char *mongrp, ...@@ -632,12 +632,17 @@ static void initialize_llc_occu_resctrl(const char *ctrlgrp, const char *mongrp,
} }
/* /*
* measure_mem_bw - Measures memory bandwidth numbers while benchmark runs
* @uparams: User supplied parameters
* @param: Parameters passed to resctrl_val()
* @bm_pid: PID that runs the benchmark
*
* Measure memory bandwidth from resctrl and from another source which is * Measure memory bandwidth from resctrl and from another source which is
* perf imc value or could be something else if perf imc event is not * perf imc value or could be something else if perf imc event is not
* available. Compare the two values to validate resctrl value. It takes * available. Compare the two values to validate resctrl value. It takes
* 1 sec to measure the data. * 1 sec to measure the data.
*/ */
static int measure_vals(const struct user_params *uparams, static int measure_mem_bw(const struct user_params *uparams,
struct resctrl_val_param *param, pid_t bm_pid) struct resctrl_val_param *param, pid_t bm_pid)
{ {
unsigned long bw_resc, bw_resc_start, bw_resc_end; unsigned long bw_resc, bw_resc_start, bw_resc_end;
...@@ -902,7 +907,7 @@ int resctrl_val(const struct resctrl_test *test, ...@@ -902,7 +907,7 @@ int resctrl_val(const struct resctrl_test *test,
if (!strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR)) || if (!strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR)) ||
!strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR))) { !strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR))) {
ret = measure_vals(uparams, param, bm_pid); ret = measure_mem_bw(uparams, param, bm_pid);
if (ret) if (ret)
break; break;
} else if (!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) { } else if (!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment