Re: [PATCH v12 14/26] x86/resctrl: Add the functionality to assign MBM events

From: Reinette Chatre
Date: Wed Apr 16 2025 - 15:02:36 EST


Hi Babu,

On 4/16/25 10:09 AM, Moger, Babu wrote:
> On 4/15/25 11:53, Reinette Chatre wrote:
>> On 4/15/25 7:20 AM, Moger, Babu wrote:
>>> On 4/11/25 16:04, Reinette Chatre wrote:
>>>> On 4/3/25 5:18 PM, Babu Moger wrote:
>>>>> The mbm_cntr_assign mode offers "num_mbm_cntrs" number of counters that
>>>>> can be assigned to an RMID, event pair and monitor the bandwidth as long
>>>>> as it is assigned.
>>>>
>>>> Above makes it sound as though multiple counters can be assigned to
>>>> an RMID, event pair.
>>>>
>>>
>>> Yes. Multiple counter-ids can be assigned to RMID, event pair.
>>
>> oh, are you referring to the assignments of different counters across multiple
>> domains?
>
> May be I am confusing you here. This is what I meant.
>
> Here is one example.
>
> In a same group,

"same group" means single RMID, eg. RMID_A

> Configure cntr_id 0, to count reads only (This maps to total event).

This will be one event, event0, so one counter assigned to RMID_A, event0 pair.

> Configure cntr_id 1, to count write only (This maps to local event).

... event1, one counter assigned to RMID_A, event1 pair, ...

> Configure cntr_id 2, to count dirty victims.

... event2, one counter assigned to RMID_A, event2 pair, ...

> so on..
> so on..
> Configure cntr_id 31, to count remote read only.

... and event31, one counter assigned to RMID_A, event31 pair.

The example reflects that a *single* counter can be assigned to an RMID, event pair.

Considering above, perhaps changelog can start with something like:
mbm_cntr_assign mode offers "num_mbm_cntrs" number of counters that
can be assigned to RMID, event pairs ....

>
> We have 32 counter ids in a domain. Basically, we can configure all the
> counters in a domain to just one group if you want to.

Understood.


>
> We cannot do that right now because our data structures cannot do that.
> We can only configure 2 events(local and total) right now.
>
> My understanding it is same with MPAM also.

Reinette