Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept

From: Ben Horgan

Date: Thu Jun 04 2026 - 06:12:46 EST


Hi Tony,

On 6/3/26 19:46, Luck, Tony wrote:
> Reinette,
>
> Tiny bug in "mpam,x86,fs/resctrl: Transition resource control to a list"
>
>> /*
>> * Return length needed to display longest control suffix.
>> * Add 1 for the "_" character when control name exists.
>> */
>> size_t resctrl_resource_ctrl_max_len(struct rdt_resource *r)
>> {
>> struct resctrl_ctrl *ctrl;
>> size_t total = 0;
>> size_t len;
>>
>> for_each_resource_ctrl(ctrl,r) {
>> len = strlen(resctrl_ctrl_name_str(ctrl->name));
>> if (len)
>> total += 1 + len;
>
> Should be:
>
> total = max(total, 1 + len);
>
>> }
>>
>> return total;
>> }
>
> Your sample code just converts "MB" over to using a list of controls.
> Would it also work for code & data priority? E.g. by having controls
> for "_CODE" and "_DATA" that are on the list when CDP is enabled, and
> just a no name control for the default?

Is there a plan to expand to support CDP for things other than cache allocation?
This would help for MPAM as we currently don't support the MB schema when CDP is
enabled for L2 or L3 as we have no way of reliably supporting it for the caches
but not the memory allocation.

Thanks,

Ben

>
> -Tony