Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept
From: Reinette Chatre
Date: Wed Jun 17 2026 - 13:18:53 EST
Hi Babu,
On 6/15/26 2:05 PM, Moger, Babu wrote:
>
> Re-based GMBA patches[3] on top of this series.
Thank you very much for trying it out.
>
> [3] https://lore.kernel.org/lkml/cover.1776980182.git.babu.moger@xxxxxxx/
>
> #sudo mount -t resctrl resctrl /sys/fs/resctrl
>
> #cat /sys/fs/resctrl/schemata
> SMBA_GBL:0=4096;1=4096
> SMBA:0=8192;1=8192;2=8192;3=8192
> MB_GBL:0=4096;1=4096
> MB:0=8192;1=8192;2=8192;3=8192
> L3:0=ffff;1=ffff;2=ffff;3=ffff
>
>
> Needed this change to get the schemata alignment correctly.
>
> Note: Renamed GMB to MB_GBL and GSMBA to SMBA_GBL.
>
> ===========================================================
> diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
> index 979176b054e8..6123689e1250 100644
> --- a/fs/resctrl/ctrlmondata.c
> +++ b/fs/resctrl/ctrlmondata.c
> @@ -512,17 +512,22 @@ static void show_doms(struct seq_file *s, struct rdt_resource_final *f,
> {
> struct rdt_resource *r = f->res;
> struct rdt_ctrl_domain *dom;
> + char res_name[16];
> bool sep = false;
> u32 ctrl_val;
>
> /* Walking r->domains, ensure it can't race with cpuhp */
> lockdep_assert_cpus_held();
>
> - if (print_ctrl)
> - seq_printf(s, "%*s%s%s:", max_name_width, f->name,
> - resctrl_ctrl_is_default(ctrl) ? "" : "_",
> - resctrl_ctrl_is_default(ctrl) ?
> - "" : resctrl_ctrl_name_str(ctrl->name));
> + if (print_ctrl) {
> + if (resctrl_ctrl_is_default(ctrl))
> + snprintf(res_name, sizeof(res_name), "%s", f->name);
> + else
> + snprintf(res_name, sizeof(res_name), "%s_%s",
> + f->name, resctrl_ctrl_name_str(ctrl->name));
> + seq_printf(s, "%*s:", max_name_width, res_name);
> + }
> +
> list_for_each_entry(dom, &ctrl->domains, hdr.list) {
> if (sep)
> seq_puts(s, ";");
>
This looks like a workaround for a bug. Are you perhaps running with Tony's
fixup included?
https://lore.kernel.org/lkml/aiB2oJFPF-sqUVQx@agluck-desk3/
> ====================================================================
>
> $ tree /sys/fs/resctrl/info/MB/
> /sys/fs/resctrl/info/MB/
> ├── bandwidth_gran
> ├── delay_linear
> ├── min_bandwidth
> ├── num_closids
> └── resource_schemata
> ├── MB
> │ ├── max
> │ ├── min
> │ ├── resolution
> │ ├── scale
> │ ├── scope
> │ ├── tolerance
> │ ├── type
> │ └── unit
> └── MB_GBL
> ├── max
> ├── min
> ├── resolution
> ├── scale
> ├── scope
> ├── tolerance
> ├── type
> └── unit
>
> 4 directories, 20 files
>
>
> $ tree /sys/fs/resctrl/info/SMBA/
> /sys/fs/resctrl/info/SMBA/
> ├── bandwidth_gran
> ├── delay_linear
> ├── min_bandwidth
> ├── num_closids
> └── resource_schemata
> ├── SMBA
> │ ├── max
> │ ├── min
> │ ├── resolution
> │ ├── scale
> │ ├── scope
> │ ├── tolerance
> │ ├── type
> │ └── unit
> └── SMBA_GBL
> ├── max
> ├── min
> ├── resolution
> ├── scale
> ├── scope
> ├── tolerance
> ├── type
> └── unit
>
> 4 directories, 20 files
>
> Does the info directory hierarchy look right?
I am not sure if the "GBL" extension is most informative. In this thread there
were some motivations for the control names to include the scope. It could be useful
to create some control naming customs to not have the schemata file become chaotic.
Apart from that the hierarchy above matches what we have so far for the new schema
descriptions.
Could you please also share the contents of the new files resulting from this
implementation?
> After going through the comments, it seems like it should cover most
> of the upcoming features. At least the Global MBA/SMBA stuff looks
> like it fits in well with the RFC.
That is good news.
> What is your expectation for the RFC going forward?
The "opens" of the RFC needs to be finalized as well as the items identified during this
discussion. How to support emulated controls looks to be the biggest one. While the
initial schema description may not need to support emulated controls, how to support
it needs to be clear since the initial schema description needs to be accompanied
with enough user documentation to support such future change.
It should be possible to start upstreaming at least the preparatory patches.
Reinette