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

From: Reinette Chatre

Date: Wed Jun 10 2026 - 14:14:22 EST


Hi Chenyu,

On 6/10/26 10:57 AM, Chen, Yu C wrote:
> On 6/11/2026 12:13 AM, Reinette Chatre wrote:

> Sorry, I did not describe this precisely. My original thought is that when writing
> schemata, we need to locate the control by iterating through the control list:
> rdtgroup_schemata_write
>   for_each_resource_ctrl(ctrl, r)
>     if (!strncmp())
>       return ctrl;
>   parse_line("0=80;1=60", ctrl)
>
> I just wonder if we can skip iterating the control list, by
> giving each control a dedicated rftype(and rftype needs to introduce
> a pointer struct resctrl_ctrl *ctrl)
> rdtgroup_ctrl_schemata_write()
>   rft = of->kn->priv

I interpret this to mean that this new "rftype" would be connected to the private
data associated with the kernfs node associated with a resctrl file. Which resctrl
file do you have in mind here? The schemata resctrl file has a kn but its private
data points to the resource group to which the schemata file belongs. The
only way to have private data of a resctrl file point to a control is if that file
is clearly associated with just that one control. This is true for the files in
the new resource_schemata directory but is not true for the files associated
with a resource group.
When viewing the schemata file associated with a resource group the user expects
to access all controls, not just one.

>   parse_line("0=80;1=60", rft->ctrl)
>

Reinette