Re: [PATCH v4 6/7] fs/resctrl: Document that automatic counter assignment is best effort

Ben Horgan
2026-04-14T14:55:05Z

Hi Reinette,

On 3/27/26 16:24, Reinette Chatre wrote:
> Hi Ben,
>
> On 3/26/26 10:25 AM, Ben Horgan wrote:
>> When using automatic counter assignment it's useful for a user to know
>> which counters they can expect to be assigned on group creation.
>>
>> Document that automatic counter assignment is best effort and how to
>> discover any assignment failures.
>>
>> Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
>> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
>> ---
>>
>> Hi Reinette,
>> I've just taken your suggested paragraph with a minor tweak (s/scenario/a
>> scenario/) and moved it above the examples as I think it makes sense to
>> keep examples last in each section.
>> ---
>> Documentation/filesystems/resctrl.rst | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
>> index ba609f8d4de5..68cada238844 100644
>> --- a/Documentation/filesystems/resctrl.rst
>> +++ b/Documentation/filesystems/resctrl.rst
>> @@ -472,6 +472,12 @@ with the following files:
>> "1":
>> Auto assignment is enabled.
>>
>> + Automatic counter assignment is done with best effort. If auto
>> + assignment is enabled but there are not enough available counters then
>> + monitor group creation could succeed while one or more events belonging
>> + to the group may not have a counter assigned. Consult last_cmd_status
>
> "not have a counter assigned" -> "not have a counter assigned in all domains"?

Ok, this is more correct.

>
>> + for details during such a scenario.
>
> While last_cmd_status would indicate a failure it is best for user space to
> consult mbm_L3_assignments for the accurate counter assignment state ("the
> details"). It is starting to sound like the documentation is directing user space
> to last_cmd_status for state and I would like to avoid this. How about replacing
> "Consult last_cmd_status ..." sentence with "Consult mbm_L3_assignments for
> counter assignment states of the new group."?

Makes sense. I agree that last_cmd_status should be keep as just a guide rather than
over complicating the reporting.

Thanks,

Ben

>
>> +
>> Example::
>>
>> # echo 0 > /sys/fs/resctrl/info/L3_MON/mbm_assign_on_mkdir
>
> Reinette