Hi Ilpo,
On 4/8/2024 9:32 AM, Ilpo Järvinen wrote:
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.
I do not know how much latency this adds but I think for the resctrl data to reach this stated goal to closely match the IMC perf counters it can keep the file descriptor open during the test and only read data from the appropriate file instead of encurring the fopen()/fclose() cost at each measurement.
Reinette