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

From: Chen, Yu C

Date: Sun Aug 09 2026 - 22:05:31 EST


Hi Reinette,

Thank you very much for providing this version,

On 8/4/2026 1:26 PM, Reinette Chatre wrote:

- Only "SAMPLE" code provided for x86 to demonstrate emulated controls.

- Add relationships between controls. For example, cannot set "MIN" control
value to be larger than "MAX. Unclear how to do this in resctrl fs when
considering that the relationship may span between enabled and disabled
controls. This is potentially something that needs to be managed by architecture
and thus potentially without a consistent failure to user space.

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?

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?


thanks,
Chenyu