Searched hist:da50de0a92f31605423e39e6ccf3ce7508e88a7a (Results 1 – 1 of 1) sorted by relevance
/linux/tools/testing/selftests/resctrl/ |
H A D | resctrl_val.c | diff da50de0a92f31605423e39e6ccf3ce7508e88a7a Mon Jun 10 17:14:43 CEST 2024 Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only
For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs the measurement over a duration of sleep(1) call. The memory bandwidth numbers from IMC are derived over this duration. The resctrl FS derived memory bandwidth, however, is calculated inside measure_vals() and only takes delta between the previous value and the current one which besides the actual test, also samples inter-test noise.
Rework the logic in measure_vals() and get_mem_bw_imc() such that the resctrl FS memory bandwidth section covers much shorter duration closely matching that of the IMC perf counters to improve measurement accuracy.
For the second read after rewind() to return a fresh value, also newline has to be consumed by the fscanf().
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>
|