Re: [RFC PATCH 01/19] x86,fs/resctrl: Add support for Global Bandwidth Enforcement (GLBE)

From: Reinette Chatre

Date: Mon Feb 23 2026 - 12:44:04 EST


Hi Fenghua,

On 2/23/26 5:21 AM, Fenghua Yu wrote:
> Hi, Reinette,
>
>> What if, instead, it looks something like:
>>
>>info/
>>└── MB/
>>    └── resource_schemata/
>>        ├── GMB/
>>        │   ├── max:4096
>>        │   ├── min:1
>>        │   ├── resolution:1
>>        │   ├── scale:1
>>        │   ├── tolerance:0
>>        │   ├── type:scalar linear
>>        │   └── unit:GBps
>>        └── MB/
>>            ├── max:8192
>>            ├── min:1
>>            ├── resolution:8
>>            ├── scale:1
>>            ├── tolerance:0
>>            ├── type:scalar linear
>>            └── unit:GBps
>
> May I have 2 comments?

Your comments are always welcome and appreciated.

>
> 1. This directory is for both info and control, right?

Right.

>
> "info" is a read-only directory:
> dr-xr-xr-x 8 root root 0 Feb 23 12:50 info

While "info" is a read-only directory it has contained writable files
since the original monitoring support landed (max_threshold_occupancy)
and has gained more writable files since then.

>
> And its name suggests it's for info only as well.
>
> Instead of mixing legal info and control together, is it better to add a new "control" or "config" directory in /sys/fs/resctrl for this control and info purpose?

While I agree "config" may be a more appropriate name I do not think we are
in a position to change it now. The documentation is clear here with there being
only two sections for resctrl files: "Info directory" and "Resource alloc and monitor groups".


>
> 2. This control method seems only handles global control for resources. But what if a control is per domain and per closid/partid?

The intention of the files within info/<resource>/resource_schemata related to
controls are to describe the control *properties*, not for user space to set control
values using these files.
The values of the controls will continue to be set by user space via the per
closid/partid/resource group "schemata" file. The intention of the info/<resource>/resource_schemata
files is to describe to user space what are valid values for the "schemata" file and
the expectation is that these files (info/<resource>/resource_schemata/*) will
be (at least initially) read-only.

> For example, MPAM has a hardlimit control per mem bandwidth allocation domain per partid. When hardlimit is enabled, MPAM hardware enforces hard limit of MBW max. This can not be controlled globally.
>
> For this kind of per partid per domain control, propose config_schemata/control_schemata file:
>
> partition X/
>     control_schemata (or config_schemata):
>         MB_hardlimit: 0=0/1;1=0/1;...
>
> Is this reasonable?

Yes, managing HARDLIM as additional schema/control is reasonable.
Exactly how to expose its valid values to user space via info/ files has not
been discussed but I believe the schema description format does support such
extension.
Please see https://lore.kernel.org/lkml/aO0Oazuxt54hQFbx@xxxxxxxxxxxxxxx/ for
some example schemata related to HARDLIM.

Reinette