Skip to content

Commit bc074b6

Browse files
ij-intelshuahkh
authored andcommitted
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: 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>
1 parent b0bd742 commit bc074b6

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

tools/testing/selftests/resctrl/resctrl_val.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,13 +632,18 @@ static void initialize_llc_occu_resctrl(const char *ctrlgrp, const char *mongrp,
632632
}
633633

634634
/*
635+
* measure_mem_bw - Measures memory bandwidth numbers while benchmark runs
636+
* @uparams: User supplied parameters
637+
* @param: Parameters passed to resctrl_val()
638+
* @bm_pid: PID that runs the benchmark
639+
*
635640
* Measure memory bandwidth from resctrl and from another source which is
636641
* perf imc value or could be something else if perf imc event is not
637642
* available. Compare the two values to validate resctrl value. It takes
638643
* 1 sec to measure the data.
639644
*/
640-
static int measure_vals(const struct user_params *uparams,
641-
struct resctrl_val_param *param, pid_t bm_pid)
645+
static int measure_mem_bw(const struct user_params *uparams,
646+
struct resctrl_val_param *param, pid_t bm_pid)
642647
{
643648
unsigned long bw_resc, bw_resc_start, bw_resc_end;
644649
FILE *mem_bw_fp;
@@ -902,7 +907,7 @@ int resctrl_val(const struct resctrl_test *test,
902907

903908
if (!strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR)) ||
904909
!strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR))) {
905-
ret = measure_vals(uparams, param, bm_pid);
910+
ret = measure_mem_bw(uparams, param, bm_pid);
906911
if (ret)
907912
break;
908913
} else if (!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) {

0 commit comments

Comments
 (0)