[PATCH v4 15/41] arm_mpam: resctrl: Pick the caches we will use as resctrl resources

Reinette Chatre reinette.chatre at intel.com
Thu Feb 12 08:22:27 PST 2026


Hi Ben,

On 2/11/26 3:05 AM, Ben Horgan wrote:
> Hi Reinette,
> 
> On Tue, Feb 10, 2026 at 03:39:51PM -0800, Reinette Chatre wrote:
>> Hi Ben,
>>
>> On 2/3/26 1:43 PM, Ben Horgan wrote:
>> ...
>>> +
>>>  static int mpam_resctrl_control_init(struct mpam_resctrl_res *res)
>>>  {
>>> -	/* TODO: initialise the resctrl resources */
>>> +	struct mpam_class *class = res->class;
>>> +	struct rdt_resource *r = &res->resctrl_res;
>>> +
>>> +	switch (r->rid) {
>>> +	case RDT_RESOURCE_L2:
>>> +	case RDT_RESOURCE_L3:
>>> +		r->alloc_capable = true;
>>> +		r->schema_fmt = RESCTRL_SCHEMA_BITMAP;
>>> +		r->cache.arch_has_sparse_bitmasks = true;
>>> +
>>> +		r->cache.cbm_len = class->props.cpbm_wd;
>>> +		/* mpam_devices will reject empty bitmaps */
>>> +		r->cache.min_cbm_bits = 1;
>>> +
>>> +		if (r->rid == RDT_RESOURCE_L2) {
>>> +			r->name = "L2";
>>
>> This code is fine but highlights that resctrl fs should not let the
>> arch need to do this since this name is used as part of user interface.
> 
> Yes, not ideal but I don't think it's urgent to tidy this up.

I agree. This code is fine. I just shared an observation.

Reinette




More information about the linux-arm-kernel mailing list