Re: [RFC v2] arm,x86,fs/resctrl: Generic schema description Proof of Concept
From: Chen, Yu C
Date: Mon Aug 10 2026 - 13:24:00 EST
Hi Reinette,
On 8/10/2026 11:53 PM, Reinette Chatre wrote:
[ ... ]
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*.
OK. Previously I might have misunderstood what "legacy" means in this context:
"legacy control means using the existing MB interface in the schemata to
change the percentage value. That is to say, no matter whether
the underlying mechanism is based on MSR or MMIO, it is transparent to the
resctrl user."
which was discussed here:https://lore.kernel.org/lkml/87e4ca90-01bb-47e9-8892-0d2d56468bc0@xxxxxxxxx/
I think "legacy" now refers to "MSR" in the context of region-aware RDT,
due to lack of mapping between MSR-based and MMIO-based values.
item 2.The switching of .msr_update() is sample code to present a PoC of how
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?
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.
Then for the current region-aware MBA, should we add region-aware controllers
as the same level as legacy controller, instead of adding them in legacy
controllers' emulated_by list, since the legacy controller is not
emulated by region-aware controllers? And we might need to introduce enable/disable
flag per controller, which could be switched on/off when switching between
legacy and native.
thanks,
Chenyu
I do not think any of the other architectures' features would need something
like this.
Reinette