Re: [PATCH v5 2/2] x86,fs/resctrl: Keep mbm_assign_mode in default mode at boot

From: Reinette Chatre

Date: Tue Oct 27 2026 - 12:40:15 EST


Hi Babu,

On 10/27/26 7:48 AM, Babu Moger wrote:
> On 10/26/26 19:15, Reinette Chatre wrote:
>> On 10/21/26 4:58 PM, Babu Moger wrote:

...

>>
>>> +  # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_mode
>>> +  [default]
>>> +  mbm_event
>>> +
>>> +The "default" mode is enabled. "mbm_event" is supported but not enabled.
>>>   +b. Enable "mbm_event" mode. Switching the mbm_assign_mode may
>>> +reset all the MBM counters (and thus all MBM events) of all the resctrl groups.
>>> +::
>>> +
>>> +  # echo "mbm_event" > /sys/fs/resctrl/info/L3_MON/mbm_assign_mode
>>>     # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_mode
>>>     [mbm_event]
>>>     default
>>>  
>>
>> The above changes could be merged together under a single step "a" that
>> will significantly reduce the churn when considering this is a stable patch.
>
> Yes. We can. But because of auto assign is not enabled on mode switch, we still have to touch few steps. Your choice.

Understood. The benefit here is that the patch will only change actual information.

Specifically, changes like the two below that just updates the letter
associated with the step:

>>> -b. Check how many assignable counters are supported.
>>> +c. Check how many assignable counters are supported.
>>>   ::
>>>       # cat /sys/fs/resctrl/info/L3_MON/num_mbm_cntrs
>>>     0=32;1=32

and

>>>   -c. Check how many assignable counters are available for assignment in each domain.
>>> +d. Check how many assignable counters are available for assignment in each domain.
>>>   ::

will be dropped from the patch. They distract from the core change and do not
seem appropriate for a patch headed to stable.

...

>>>   -h. Read the events mbm_total_bytes and mbm_local_bytes of the default group. There is
>>> +i. Read the events mbm_total_bytes and mbm_local_bytes of the default group. There is
>>>   no change in reading the events with the assignment.
>>>   ::
>>
>> Could you please remind me if the first read after assignment returns
>> "Unavailable" or a valid count?
>
>
> As far as I have observed, mbm_event mode (ABMC) returns either 0
> when there is no activity or a valid count. I have not personally
> encountered an Unavailable value. However, the specification allows
> Unavailable to be returned when the count is not available.

Thank you for checking. I just wanted to confirm that the values shown
reasonably represents what a user may see.

Reinette