Re: [PATCH v12 18/26] x86/resctrl: Add default MBM event configurations for mbm_cntr_assign mode

From: Moger, Babu
Date: Wed Apr 16 2025 - 13:26:56 EST


Hi Tony/Reinette,

On 4/16/25 11:21, Reinette Chatre wrote:
> Hi Tony,
>
> On 4/15/25 12:25 PM, Luck, Tony wrote:
>>> By default, each resctrl group supports two MBM events: mbm_total_bytes
>>> and mbm_local_bytes. These represent total and local memory bandwidth
>>> monitoring, respectively. Each event corresponds to a specific MBM
>>> configuration. Use these default configurations to set up the counters
>>> during mount. Allow users to modify the configurations as needed after
>>> initialization.
>>
>> I think an update to this part of the resctrl.rst documentation is somewhat
>> overdue:
>>
>> In a MON group these files provide a read out of the current
>> value of the event for all tasks in the group. In CTRL_MON groups
>> these files provide the sum for all tasks in the CTRL_MON group
>> and all tasks in MON groups. Please see example section for more
>> details on usage.
>>
>> The sentence about CTRL_MON groups providing the sum for all tasks
>> in the child MON groups is only true if counters are assigned to all of
>> those MON groups. What mon_event_count() actually does is to
>> return success if any of the CTRL_MON or child MON groups succeeded
>> with the count being the sum of all the successes.
>
> Thanks for catching this. This would be important to highlight so that
> user space does not have impression that events of CTRL_MON can be
> used as estimate for MON groups that do not have counters assigned.
>

Sure. Will add text about it.

--
Thanks
Babu Moger