Re: [PATCH v7 05/24] x86/resctrl: Track the closid with the rmid

From: James Morse
Date: Wed Dec 13 2023 - 13:04:20 EST


Hi Babu,

On 09/11/2023 20:31, Moger, Babu wrote:
> On 10/25/23 13:03, James Morse wrote:
>> x86's RMID are independent of the CLOSID. An RMID can be allocated,
>> used and freed without considering the CLOSID.
>>
>> MPAM's equivalent feature is PMG, which is not an independent number,
>> it extends the CLOSID/PARTID space. For MPAM, only PMG-bits worth of
>> 'RMID' can be allocated for a single CLOSID.
>> i.e. if there is 1 bit of PMG space, then each CLOSID can have two
>> monitor groups.
>>
>> To allow resctrl to disambiguate RMID values for different CLOSID,
>> everything in resctrl that keeps an RMID value needs to know the CLOSID
>> too. This will always be ignored on x86.

>> diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
>> index 5d9864919f1c..2a0233cd0bc9 100644
>> --- a/arch/x86/kernel/cpu/resctrl/monitor.c
>> +++ b/arch/x86/kernel/cpu/resctrl/monitor.c
>> @@ -285,9 +300,9 @@ void __check_limbo(struct rdt_domain *d, bool force_free)
>> if (nrmid >= r->num_rmid)
>> break;
>>
>> - entry = __rmid_entry(nrmid);
>> + entry = __rmid_entry(X86_RESCTRL_EMPTY_CLOSID, nrmid);// temporary
>
> What is temporary means here? Can you please elaborate(or remove)?

It means this line gets removed in a subsequent patch - don't spend too long rationalising
the values used. This one gets removed in the next patch as __check_limbo() is changed to
operate by index instead.


Thanks,

James