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

From: Luck, Tony

Date: Wed Jun 03 2026 - 14:53:47 EST


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?

-Tony