Re: [PATCH v3 04/10] selftests/resctrl: Prepare for parsing multiple events per iMC

Reinette Chatre
2026-03-26T14:35:33Z

Hi Ilpo,

On 3/26/26 6:03 AM, Ilpo Järvinen wrote:
> On Fri, 13 Mar 2026, Reinette Chatre wrote:
>
>> The events needed to read memory bandwidth are discovered by iterating
>> over every memory controller (iMC) within /sys/bus/event_source/devices.
>> Each iMC's PMU is assumed to have one event to measure read memory
>> bandwidth that is represented by the sysfs cas_count_read file. The event's
>> configuration is read from "cas_count_read" and stored as an element of
>> imc_counters_config[] by read_from_imc_dir() that receives the
>> index of the array where to store the configuration as argument.
>>
>> It is possible that an iMC's PMU may have more than one event that should
>> be used to measure memory bandwidth.
>>
>> Change semantics to not provide the index of the array to
>> read_from_imc_dir() but instead a pointer to the index. This enables
>> read_from_imc_dir() to store configurations for more than one event by
>> incrementing the index to imc_counters_config[] itself.
>>
>> Ensure that the same type is consistently used for the index as it is
>> passed around during counter configuration.
>>
>> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
>> Tested-by: Chen Yu <yu.c.chen@intel.com>
>> Reviewed-by: Zide Chen <zide.chen@intel.com>
>> ---

...

>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>

Thank you very much for all your reviews. Much appreciated.

Reinette