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

From: Reinette Chatre

Date: Mon Aug 10 2026 - 12:19:13 EST


Hi Chenyu,

On 8/9/26 7:05 PM, Chen, Yu C wrote:
> On 8/4/2026 1:26 PM, Reinette Chatre wrote:

> I have tested this version, and it exhibits the expected
> behavior according to my understanding:
>
> The following is the legacy schemata:
> [root@ resctrl]# cat schemata
>             MB:0=100;1=100;2=100;3=100
>
> and the following is the native schemata:
> [root@ resctrl]# echo native > /sys/fs/resctrl/info/MB/control_mode
> [root@ resctrl]# cat schemata
> MB_REGION0_MAX:0=200;1=200;2=200;3=200
> MB_REGION0_MIN:0=1;1=1;2=1;3=1
>
> I have a minor question I'd like to confirm:
>
> item 1.
> In legacy mode, we intend to always let the "native" controller
> emulate the "legacy" controller - at least for the region‑aware
> RDT case.
> Q1: Is this understanding correct?

As I understand region-aware is what actually makes this impossible to do
since there is no mapping from "legacy" percentage based control value to
"native" control value. Even more, the hardware self has two separate interfaces:
"legacy" uses MSR interface and "native" uses ACPI interface. As I see it a
region aware system in "legacy" mode is using the "legacy" MSR interface and
not use the "native" ACPI interface *at all*.

> item 2.
> In commit fbed64f80515 ("x86/resctrl: SAMPLE: Emulated controls"),
> during resctrl initialization, __get_mem_config_intel() clears
> the legacy controller's hw_ctrl->msr_update to NULL, and sets
> its emulation controllers in hw_ctrl->r_ctrl.emulated_by to
> the region-aware related controllers. So legacy controller is
> emulated by region-aware controllers.
>
> item 3.
> In resctrl_arch_control_mode_set(), when switching to "legacy"
> mode, the legacy controller is set to:
> hw_ctrl->msr_update = update_temporary_legacy_MB;
> while the emulating controller is set to NULL:
> hw_ctrl->msr_update = NULL;
> That means, the emulated controllers will not take effect.
>
> Q2:Does item 3 contradict item 1?
The switching of .msr_update() is sample code to present a PoC of how
region-aware could be supported based on my understanding described above.
I expected that, for example, when user space switches the control mode between
"legacy"/"native" then the region-aware code would disable/enable region-aware
mode via the RDT_CTRL register and adjust the .msr_update() to match what
hardware interface is active.

If at some point in future it becomes possible for resctrl to know how to
map a legacy control value to a native control value for region aware then this
switching should no longer be necessary and the "native" fine grained controller
can always be used to emulate the "legacy" percentage based controller and to
support this the ACPI interface would be enabled all the time.

I do not think any of the other architectures' features would need something
like this.

Reinette