Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept
From: Chen, Yu C
Date: Fri Jul 17 2026 - 12:03:16 EST
Hi Reinette,
On 7/17/2026 12:04 AM, Reinette Chatre wrote:
Hi Ben, Chenyu, and Tony,
[ ... ]
Alternatively, could the "mode" file be used to switch between "MB" and "MB_MAX" and the two never
need be shown at the same time. The user opts in to using the new interface, "MB_MAX" by setting
"mode" and can just toggle back if they want to use "MB" directly again.
Would this approach also work for region‑aware MBA, where a "mode" file is used to
toggle between "MB" and "MB_REGIONx_MAX", ensuring that the two are never displayed
simultaneously in the schemata?
[ ... ]
RDT region aware when using MSR interface for legacy controls
=============================================================
Do you mean there is a requirement to use the MSR interface when region‑aware
MMIO is available? My thought was that, if fine‑grained control(like MMIO) is
available, it would be good to always let the fine‑grained control emulate the
legacy one.
And I'm trying to figure out the definition of "legacy controls":
Previously I thought that "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.
For example, if the mode is "legacy", and user writes "MB:0=50" to the schemata
file,
1. If that platform only supports the MSR interface, then it will be translated
into an MSR write. Or,
2. If that platform supports MMIO access (i.e., the ACPI table is available),
we convert 50 into 50 × 255 / 100, and write it to the MMIO address. In this way,
the user still sees the "legacy" interface.
1) System default
info hierarchy
--------------
info/
└── MB/
└── schemata/
├── MB/
│ ├── MB_REGION0_MAX/
│ │ └── status:disabled
│ ├── MB_REGION1_MAX/
│ │ └── status:disabled
│ ├── MB_REGION2_MAX/
│ │ └── status:disabled
│ ├── MB_REGION3_MAX/
│ │ └── status:disabled
│ └── status:enabled
└── mode:[legacy] native
schemata file
-------------
MB:...
2) User space switches to fine grained controls
# echo "native" > /sys/fs/resctrl/info/MB/schemata/mode
info hierarchy
--------------
info/
└── MB/
└── schemata/
├── MB/
│ ├── MB_REGION0_MAX/
│ │ └── status:enabled
│ ├── MB_REGION1_MAX/
│ │ └── status:enabled
│ ├── MB_REGION2_MAX/
│ │ └── status:enabled
│ ├── MB_REGION3_MAX/
│ │ └── status:enabled
│ └── status:disabled
└── mode:legacy [native]
schemata file
-------------
MB_REGION0_MAX:...
MB_REGION1_MAX:...
MB_REGION2_MAX:...
MB_REGION3_MAX:...
If I understand correctly, the "enable/disable" knobs are used to decide
whether to display this control in the schemata file. If we make legacy
and native exclusive, do we still need the "enable/disable" knob?
On a platform where MSR/MMIO are both available:
1) System default
info hierarchy
--------------
info/
└── MB/
└── schemata/
├── MB/
│ ├── MB_REGION0_MAX/
│ ├── MB_REGION1_MAX/
│ ├── MB_REGION2_MAX/
│ ├── MB_REGION3_MAX/
└── mode:[legacy] native
schemata file
-------------
MB:...
2) User space switches to fine grained controls
# echo "native" > /sys/fs/resctrl/info/MB/schemata/mode
info hierarchy
--------------
info/
└── MB/
└── schemata/
├── MB/
│ ├── MB_REGION0_MAX/
│ ├── MB_REGION1_MAX/
│ ├── MB_REGION2_MAX/
│ ├── MB_REGION3_MAX/
└── mode:legacy [native]
schemata file
-------------
MB_REGION0_MAX:...
MB_REGION1_MAX:...
MB_REGION2_MAX:...
MB_REGION3_MAX:...