mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
@ 2026-11-20  5:04 Reinette Chatre
  2026-11-20 19:48 ` Fenghua Yu
  2026-11-23  3:16 ` Chen Yu
  0 siblings, 2 replies; 7+ messages in thread
From: Reinette Chatre @ 2026-11-20  5:04 UTC (permalink / raw)
  To: Tony Luck, Ben Horgan, James Morse, Dave Martin, Babu Moger,
	Drew Fustini, Fenghua Yu, Chen Yu, Jinjie Ruan
  Cc: Borislav Petkov, Thomas Gleixner, Dave Hansen, Peter Newman, x86,
	linux-kernel, reinette.chatre

Hi Everybody,

I believe that discussions around resctrl's upcoming support for multiple
controls are starting to settle. This RFC aims to capture all the remaining
items in implementation as well as documentation. Please point out to me if
there is anything I missed.

RFC v3 of this PoC can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v3

Please refer to the documentation patch for an overview of the planned interface
changes as well as user space contracts/expectations:

https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=95ff9ff7430095cb7264946c944c750315db73d9

Remaining opens:
---------------
- Ben: I do have a question about the formula used to determine the size of
  a scalar cache control. Please see patch changelog of:
  https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=8695aab0997d5aa60e104374fae9701f51156c18
- MPAM only compile tested.
- The same x86 "SAMPLE" code as RFC v2 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 emulated and backing
  controls. This is potentially something that needs to be managed by architecture
  and thus potentially without a consistent failure to user space.

Changes since RFC v2:
--------------------
RFC v2: https://lore.kernel.org/lkml/d258a32f-12d5-464d-abe9-4720fb3e44b3@intel.com/
        git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v2

User visible changes:
- Make scope a property of the control again, now in addition to a separate
  allocation scope of the resource. Expose the control scope via a new
  per-control "scope" file (L2, L3, or NODE) that tells user space what a
  domain ID in the schemata file represents. Needed to support AMD's GLBE
  and CPU-less memory bandwidth allocation. (Ben and Babu)
- Name controls according to the scheme agreed during RFC v2 discussions:
  <resource>_<resource_scope><control_scope>_<control>, with the control
  scope dropped when it matches the resource scope. MB and SMBA carry their
  L3 scope only implicitly, so their new controls show it explicitly, for
  example MB_L3_MAX, or MB_L3NODE for a default control at NODE scope.
  https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/
- Report "max" per domain in preparation for systems with resource
  instances of different capacity. A bitmap's "max" no longer has a "0x"
  prefix. (Drew and Tony)
- Drop the "min_bits" file. The "min" file of a bitmap control now reports
  the minimum number of consecutive bits.
- Only offer, and only allow switching to, "native" control mode when the
  resource has emulated controls. (Ben)
- Only allow cache pseudo-locking via the default cache control.
- Display the "size" of scalar cache controls. (Ben)
- Stop reporting scalar control parsing errors as being about "MB". (Ben)
- Document the control naming, the "scope" file, that control values may be
  reset on a control mode switch, that legacy info files return no content
  in "native" mode, and that non-legacy resources need not have a default
  control.

Other changes:
- Require a control and the controls it is emulated by to have the same
  scope.
- Require only legacy resources to start in legacy control mode.
- Generate control schema suffix once during initialization.
- Fix initialization of the list of emulating controls (Ben), clearing of
  staged configurations of backing controls (Chenyu), and Haswell control
  initialization (Chenyu).
- Reword changelogs about CDP, allocation size and the bitmap control so
  they no longer suggest resctrl will only ever support one cache control.
- Fix checkpatch.pl issues, subject prefixes and changelog typos.

Series structure:
- Rebase on:
  - x86/cache branch of tip that is based on v7.4-rc1 with the queued
    resctrl cleanups
  - MPAM domain separation that was extracted from RFC v2 and submitted
    separately:
    https://lore.kernel.org/lkml/cover.1794283825.git.reinette.chatre@intel.com/
- Squash four patches into the patches they support:
  - "fs/resctrl: Provide control to cache allocation"
  - "x86,fs/rectrl: Provide control when requesting arch to update a single
    domain", which also keeps MPAM building at every patch in the series.
  - "fs/resctrl: Expose bitmap properties via new files in schemata folder"
  - "fs/resctrl: Include emulated controls when determining control field
    width"
- New patch from Ben: "fs/resctrl: Display size for scalar cache controls".
- Move IO allocation control selection, and the helpers that display the
  new control properties, earlier in the series.

Any feedback is appreciated.

Reinette

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
  2026-11-20  5:04 [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept Reinette Chatre
@ 2026-11-20 19:48 ` Fenghua Yu
  2026-11-20 20:26   ` Reinette Chatre
  2026-11-23  3:16 ` Chen Yu
  1 sibling, 1 reply; 7+ messages in thread
From: Fenghua Yu @ 2026-11-20 19:48 UTC (permalink / raw)
  To: Reinette Chatre, Tony Luck, Ben Horgan, James Morse, Dave Martin,
	Babu Moger, Drew Fustini, Chen Yu, Jinjie Ruan
  Cc: Borislav Petkov, Thomas Gleixner, Dave Hansen, Peter Newman, x86,
	linux-kernel



On 11/19/26 21:04, Reinette Chatre wrote:
> Hi Everybody,
> 
> I believe that discussions around resctrl's upcoming support for multiple
> controls are starting to settle. This RFC aims to capture all the remaining
> items in implementation as well as documentation. Please point out to me if
> there is anything I missed.
> 
> RFC v3 of this PoC can be found at:
> git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v3
> 
> Please refer to the documentation patch for an overview of the planned interface
> changes as well as user space contracts/expectations:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=95ff9ff7430095cb7264946c944c750315db73d9
> 
> Remaining opens:
> ---------------
> - Ben: I do have a question about the formula used to determine the size of
>    a scalar cache control. Please see patch changelog of:
>    https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=8695aab0997d5aa60e104374fae9701f51156c18
> - MPAM only compile tested.

Basic MPAM tests work fine.

Thanks.

-Fenghua

[SNIP]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
  2026-11-20 19:48 ` Fenghua Yu
@ 2026-11-20 20:26   ` Reinette Chatre
  0 siblings, 0 replies; 7+ messages in thread
From: Reinette Chatre @ 2026-11-20 20:26 UTC (permalink / raw)
  To: Fenghua Yu, Tony Luck, Ben Horgan, James Morse, Dave Martin,
	Babu Moger, Drew Fustini, Chen Yu, Jinjie Ruan
  Cc: Borislav Petkov, Thomas Gleixner, Dave Hansen, Peter Newman, x86,
	linux-kernel

Hi Fenghua,

On 11/20/26 11:48 AM, Fenghua Yu wrote:
> 
> 
> On 11/19/26 21:04, Reinette Chatre wrote:
>> Hi Everybody,
>>
>> I believe that discussions around resctrl's upcoming support for multiple
>> controls are starting to settle. This RFC aims to capture all the remaining
>> items in implementation as well as documentation. Please point out to me if
>> there is anything I missed.
>>
>> RFC v3 of this PoC can be found at:
>> git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v3
>>
>> Please refer to the documentation patch for an overview of the planned interface
>> changes as well as user space contracts/expectations:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=95ff9ff7430095cb7264946c944c750315db73d9
>>
>> Remaining opens:
>> ---------------
>> - Ben: I do have a question about the formula used to determine the size of
>>    a scalar cache control. Please see patch changelog of:
>>    https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=8695aab0997d5aa60e104374fae9701f51156c18
>> - MPAM only compile tested.
> 
> Basic MPAM tests work fine.
> 
Thank you very much for testing this. Much appreciated.

This version implements the naming format that Ben pointed out to you in

	https://lore.kernel.org/all/10d97df6-ccfc-4025-9773-0ebe7421cbaf@arm.com/

that points to a discussion during RFC v1 of the PoC, which continued in RFC v2
and finally settled there as

	https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/

In this version, the driver is required to set a scope when creating a new control
and resctrl filesystem constructs the final name. The new naming should "just work"
for features built on top of this. Please let me know where it does not.

Reinette

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
  2026-11-20  5:04 [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept Reinette Chatre
  2026-11-20 19:48 ` Fenghua Yu
@ 2026-11-23  3:16 ` Chen Yu
  2026-11-24  4:26   ` Reinette Chatre
  1 sibling, 1 reply; 7+ messages in thread
From: Chen Yu @ 2026-11-23  3:16 UTC (permalink / raw)
  To: Reinette Chatre
  Cc: Tony Luck, Ben Horgan, James Morse, Dave Martin, Babu Moger,
	Drew Fustini, Fenghua Yu, Jinjie Ruan, Borislav Petkov,
	Thomas Gleixner, Dave Hansen, Peter Newman,
	chen.yu@linux.dev x86@kernel.org, linux-kernel

Hi Reinette,

On Thu, Nov 19, 2026 at 09:04:26PM -0800, Reinette Chatre wrote:
> Hi Everybody,
> 
> I believe that discussions around resctrl's upcoming support for multiple
> controls are starting to settle. This RFC aims to capture all the remaining
> items in implementation as well as documentation. Please point out to me if
> there is anything I missed.
> 
> RFC v3 of this PoC can be found at:
> git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v3
> 
> Please refer to the documentation patch for an overview of the planned interface
> changes as well as user space contracts/expectations:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=95ff9ff7430095cb7264946c944c750315db73d9
> 
> Remaining opens:
> ---------------
> - Ben: I do have a question about the formula used to determine the size of
>   a scalar cache control. Please see patch changelog of:
>   https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=8695aab0997d5aa60e104374fae9701f51156c18
> - MPAM only compile tested.
> - The same x86 "SAMPLE" code as RFC v2 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 emulated and backing
>   controls. This is potentially something that needs to be managed by architecture
>   and thus potentially without a consistent failure to user space.
> 
> Changes since RFC v2:
> --------------------
> RFC v2: https://lore.kernel.org/lkml/d258a32f-12d5-464d-abe9-4720fb3e44b3@intel.com/
>         git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v2
> 
> User visible changes:
> - Make scope a property of the control again, now in addition to a separate
>   allocation scope of the resource. Expose the control scope via a new
>   per-control "scope" file (L2, L3, or NODE) that tells user space what a
>   domain ID in the schemata file represents. Needed to support AMD's GLBE
>   and CPU-less memory bandwidth allocation. (Ben and Babu)
> - Name controls according to the scheme agreed during RFC v2 discussions:
>   <resource>_<resource_scope><control_scope>_<control>, with the control
>   scope dropped when it matches the resource scope. MB and SMBA carry their
>   L3 scope only implicitly, so their new controls show it explicitly, for
>   example MB_L3_MAX, or MB_L3NODE for a default control at NODE scope.

This is a little different from the previous version. May I know the motivation
for displaying both the resource's alloc_scope and the control's scope? Is it
because AMD GLBE might have different granularity between the alloc_scope and the
control's scope, so we want to show it to userspace? Maybe we can add a section
in the document to mention this, as you described at [1]:

"resource scope":
        The scope of the resource object being allocated, that is, the
        hardware level at which the resource resides and is consumed, for
        example the L3 cache, memory bandwidth at L3 egress, or memory
        bandwidth at NUMA node ingress. The resource scope is part of the
        resource name and does not change the meaning of a domain ID.

"control scope":
        The granularity at which the hardware is able to control the
        resource. One control value applies to one instance of the control
        scope, and the control scope determines what a domain ID in the
        schemata file represents. It is exposed via the control's "scope"
        file.

The resource scope and control scope are usually the same. They differ
when the resource is at one scope but the hardware is only able to
control it at another scope. Examples:

Intel RDT MBA:
        Resource:    Memory bandwidth leaving the L3 (egress).
        Granularity: One value per L3 domain. The value is a throttling
                     level applied to each CPU of the CLOS within the
                     domain - according to the spec, MBA control the speed
                     between L2 and L3.

Arm MPAM:
        Resource:    Memory bandwidth entering the memory of a NUMA node
                     (ingress), regardless of which CPU issued the request.
        Granularity: One value per NUMA node.

AMD GLBE:
        Resource:    L3 external bandwidth (egress).
        Granularity: One value per GLBE control domain (a NUMA node, or
                     the whole system with NPS4). The value is a ceiling
                     shared by all L3s in the domain. This is the example
                     that resource alloc_scope is different than the control
                     scope.

BTW, can we provide a control flag that indicates whether the controller(even
the new controllers than the legacy ones) want to display the alloc_scope/control scope
via schemata? On v3, the region_aware schemata becomes:

MB_L3_REGION0_OPT/MIN/MAX

previously it is:

MB_REGION0_OPT/MIN/MAX

On many platforms, the alloc_scope an scope are the same, and how about:

--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -5619,7 +5619,7 @@ static int gen_ctrl_suffix(struct rdt_resource *r, struct resctrl_ctrl *ctrl)
                 * the omission.
                 */
                if (r->alloc_scope == ctrl->scope) {
-                       if (ctrl->name == RESCTRL_CTRL_NAME_DEF) {
+                       if (ctrl->name == RESCTRL_CTRL_NAME_DEF || !ctrl->show_scope) {
                                ctrl->schema_suf[0] = '\0';
                                return 0;
                        } else {

[1] https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/

>   https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/
> - Report "max" per domain in preparation for systems with resource
>   instances of different capacity. A bitmap's "max" no longer has a "0x"
>   prefix. (Drew and Tony)
> - Drop the "min_bits" file. The "min" file of a bitmap control now reports
>   the minimum number of consecutive bits.
> - Only offer, and only allow switching to, "native" control mode when the
>   resource has emulated controls. (Ben)

May I know how we can distinguish whether a legacy control can be emulated by
other controls?

There are two scenarios. The first scenario is that a legacy control is emulated
by sub-controllers, and the second scenario is that it is not emulated by any other
controllers.

In the first scenario, in the current code, after we switch from legacy -> native -> legacy
mode, the msr_update for the legacy control is non-NULL, so program_backing_controls() will
never be invoked again.

In the second scenario, which is the region-aware MBA scenario, the regionX controllers are
independent of the legacy MSR-based MSR, the legacy control is not emulated by the region-aware
control, so in the current RFC v3 it fits well - the non-NULL msr_update will be invoked by
either the legacy MSR-based control or the region-aware control.

The issue with the first scenario is that we don't have an indicator to tell fs/resctrl whether
this legacy control is emulated by other controls. Although we have an emulated_ctrl list in each
control, that list is re-used by the non-emulated control scenario such as region-aware RDT. How
about introducing a control flag to say that the legacy control must be emulated by other controls,
rather than checking whether the control's msr_update is NULL or not in _resctrl_arch_update_domains()?

 if (!hw_ctrl->msr_update)
    program_backing_controls()

to:

  if (hw_ctrl->emulated)
    program_backing_controls()

thanks,
Chenyu

> - Only allow cache pseudo-locking via the default cache control.
> - Display the "size" of scalar cache controls. (Ben)
> - Stop reporting scalar control parsing errors as being about "MB". (Ben)
> - Document the control naming, the "scope" file, that control values may be
>   reset on a control mode switch, that legacy info files return no content
>   in "native" mode, and that non-legacy resources need not have a default
>   control.
> 
> Other changes:
> - Require a control and the controls it is emulated by to have the same
>   scope.
> - Require only legacy resources to start in legacy control mode.
> - Generate control schema suffix once during initialization.
> - Fix initialization of the list of emulating controls (Ben), clearing of
>   staged configurations of backing controls (Chenyu), and Haswell control
>   initialization (Chenyu).
> - Reword changelogs about CDP, allocation size and the bitmap control so
>   they no longer suggest resctrl will only ever support one cache control.
> - Fix checkpatch.pl issues, subject prefixes and changelog typos.
> 
> Series structure:
> - Rebase on:
>   - x86/cache branch of tip that is based on v7.4-rc1 with the queued
>     resctrl cleanups
>   - MPAM domain separation that was extracted from RFC v2 and submitted
>     separately:
>     https://lore.kernel.org/lkml/cover.1794283825.git.reinette.chatre@intel.com/
> - Squash four patches into the patches they support:
>   - "fs/resctrl: Provide control to cache allocation"
>   - "x86,fs/rectrl: Provide control when requesting arch to update a single
>     domain", which also keeps MPAM building at every patch in the series.
>   - "fs/resctrl: Expose bitmap properties via new files in schemata folder"
>   - "fs/resctrl: Include emulated controls when determining control field
>     width"
> - New patch from Ben: "fs/resctrl: Display size for scalar cache controls".
> - Move IO allocation control selection, and the helpers that display the
>   new control properties, earlier in the series.
> 
> Any feedback is appreciated.
> 
> Reinette

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
  2026-11-23  3:16 ` Chen Yu
@ 2026-11-24  4:26   ` Reinette Chatre
  2026-11-25  5:10     ` Chen Yu
  0 siblings, 1 reply; 7+ messages in thread
From: Reinette Chatre @ 2026-11-24  4:26 UTC (permalink / raw)
  To: Chen Yu
  Cc: Tony Luck, Ben Horgan, James Morse, Dave Martin, Babu Moger,
	Drew Fustini, Fenghua Yu, Jinjie Ruan, Borislav Petkov,
	Thomas Gleixner, Dave Hansen, Peter Newman,
	chen.yu@linux.dev x86@kernel.org, linux-kernel

Hi Chenyu,

On 11/22/26 7:16 PM, Chen Yu wrote:
> On Thu, Nov 19, 2026 at 09:04:26PM -0800, Reinette Chatre wrote:
>> Hi Everybody,
>>
>> I believe that discussions around resctrl's upcoming support for multiple
>> controls are starting to settle. This RFC aims to capture all the remaining
>> items in implementation as well as documentation. Please point out to me if
>> there is anything I missed.
>>
>> RFC v3 of this PoC can be found at:
>> git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v3
>>
>> Please refer to the documentation patch for an overview of the planned interface
>> changes as well as user space contracts/expectations:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=95ff9ff7430095cb7264946c944c750315db73d9
>>
>> Remaining opens:
>> ---------------
>> - Ben: I do have a question about the formula used to determine the size of
>>   a scalar cache control. Please see patch changelog of:
>>   https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=8695aab0997d5aa60e104374fae9701f51156c18
>> - MPAM only compile tested.
>> - The same x86 "SAMPLE" code as RFC v2 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 emulated and backing
>>   controls. This is potentially something that needs to be managed by architecture
>>   and thus potentially without a consistent failure to user space.
>>
>> Changes since RFC v2:
>> --------------------
>> RFC v2: https://lore.kernel.org/lkml/d258a32f-12d5-464d-abe9-4720fb3e44b3@intel.com/
>>         git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v2
>>
>> User visible changes:
>> - Make scope a property of the control again, now in addition to a separate
>>   allocation scope of the resource. Expose the control scope via a new
>>   per-control "scope" file (L2, L3, or NODE) that tells user space what a
>>   domain ID in the schemata file represents. Needed to support AMD's GLBE
>>   and CPU-less memory bandwidth allocation. (Ben and Babu)
>> - Name controls according to the scheme agreed during RFC v2 discussions:
>>   <resource>_<resource_scope><control_scope>_<control>, with the control
>>   scope dropped when it matches the resource scope. MB and SMBA carry their
>>   L3 scope only implicitly, so their new controls show it explicitly, for
>>   example MB_L3_MAX, or MB_L3NODE for a default control at NODE scope.
> 
> This is a little different from the previous version. May I know the motivation
> for displaying both the resource's alloc_scope and the control's scope? Is it
> because AMD GLBE might have different granularity between the alloc_scope and the
> control's scope, so we want to show it to userspace? Maybe we can add a section

Exactly. 

> in the document to mention this, as you described at [1]:
> 
> "resource scope":
>         The scope of the resource object being allocated, that is, the
>         hardware level at which the resource resides and is consumed, for
>         example the L3 cache, memory bandwidth at L3 egress, or memory
>         bandwidth at NUMA node ingress. The resource scope is part of the
>         resource name and does not change the meaning of a domain ID.

Yes, I can add definitions for all the components of a control name (also resource
and control).

The "does not change the meaning of a domain ID" is not clear to me. We need
to be careful here while integrating it with existing documentation where the
domain ID is already tied to the resource instances.

> 
> "control scope":
>         The granularity at which the hardware is able to control the
>         resource. One control value applies to one instance of the control
>         scope, and the control scope determines what a domain ID in the
>         schemata file represents. It is exposed via the control's "scope"
>         file.

"One control value applies to one instance of the control scope" sounds strange.
The control value allocates a portion of the resource at the scope of the control
so having it "apply to an instance of the control scope" does not sound right, it
applies to the resource, no?
One useful test here is how it reads when applied to GLBE - where the control
includes more than one instance of the resource, and referring to that as
an instance of the control scope is not accurate.
> The resource scope and control scope are usually the same. They differ
> when the resource is at one scope but the hardware is only able to
> control it at another scope. Examples:
> 
> Intel RDT MBA:
>         Resource:    Memory bandwidth leaving the L3 (egress).
>         Granularity: One value per L3 domain. The value is a throttling
>                      level applied to each CPU of the CLOS within the
>                      domain - according to the spec, MBA control the speed
>                      between L2 and L3.
> 
> Arm MPAM:
>         Resource:    Memory bandwidth entering the memory of a NUMA node
>                      (ingress), regardless of which CPU issued the request.
>         Granularity: One value per NUMA node.
> 
> AMD GLBE:
>         Resource:    L3 external bandwidth (egress).
>         Granularity: One value per GLBE control domain (a NUMA node, or
>                      the whole system with NPS4). The value is a ceiling
>                      shared by all L3s in the domain. This is the example
>                      that resource alloc_scope is different than the control
>                      scope.

I prefer to defer the Arm MPAM NUMA and AMD GLBE examples to when those features
land. These new features should introduce new sections in the documentation to
describe them and the connections/terminology of controls can/should be used then.

As far as the Intel RDT MBA example goes, there is already the big section
"Memory bandwidth Allocation and monitoring" that uses the term "L3 external
bandwidth". We should be careful to not fragment the documentation by just pasting
new sections but instead aim to integrated the information in relevant sections
(if available).

> 
> BTW, can we provide a control flag that indicates whether the controller(even
> the new controllers than the legacy ones) want to display the alloc_scope/control scope
> via schemata? On v3, the region_aware schemata becomes:

This does not sound right. resctrl filesystem aims to establish a consistent naming
convention with user space. The way I read this, you request a flag that an architecture can
use to indicate whether it wants to follow that convention or not? resctrl filesystem
aims to provide a generic and consistent interface to user space, irrespective of the
architecture. Passing ownership of interface to architecture breaks this, no?

> > MB_L3_REGION0_OPT/MIN/MAX
> 
> previously it is:
> 
> MB_REGION0_OPT/MIN/MAX
> 
> On many platforms, the alloc_scope an scope are the same, and how about:
> 
> --- a/fs/resctrl/rdtgroup.c
> +++ b/fs/resctrl/rdtgroup.c
> @@ -5619,7 +5619,7 @@ static int gen_ctrl_suffix(struct rdt_resource *r, struct resctrl_ctrl *ctrl)
>                  * the omission.
>                  */
>                 if (r->alloc_scope == ctrl->scope) {
> -                       if (ctrl->name == RESCTRL_CTRL_NAME_DEF) {
> +                       if (ctrl->name == RESCTRL_CTRL_NAME_DEF || !ctrl->show_scope) {
>                                 ctrl->schema_suf[0] = '\0';
>                                 return 0;
>                         } else {
> 
> [1] https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/
> 
>>   https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/
>> - Report "max" per domain in preparation for systems with resource
>>   instances of different capacity. A bitmap's "max" no longer has a "0x"
>>   prefix. (Drew and Tony)
>> - Drop the "min_bits" file. The "min" file of a bitmap control now reports
>>   the minimum number of consecutive bits.
>> - Only offer, and only allow switching to, "native" control mode when the
>>   resource has emulated controls. (Ben)
> 
> May I know how we can distinguish whether a legacy control can be emulated by
> other controls?

There are a few characters in this discussion: the user, resctrl filesystem,
the different architecture drivers. Which does the "we" in this question
impersonate?

> 
> There are two scenarios. The first scenario is that a legacy control is emulated
> by sub-controllers, and the second scenario is that it is not emulated by any other
> controllers.
> 
> In the first scenario, in the current code, after we switch from legacy -> native -> legacy
> mode, the msr_update for the legacy control is non-NULL, so program_backing_controls() will
> never be invoked again.

This is just what the "sample" code does to demonstrate some techniques the architecture
driver can use. Please do not build on top of the sample patches. The architecture code _could_
use similar techniques, but is not required to. It is *sample* code. There is no intention of
upstreaming those patches. If you find them useful then you can copy/refactor them to make them
appropriate for your use - in this situation just modify resctrl_arch_control_mode_set() to
set msr_update() to NULL when the control mode switches to legacy (if that is the behavior the
architecture needs).

Any feature needing multiple controls is welcome to copy some code from the sample patches,
but all patches with "SAMPLE" prefix are expected to be dropped. They only exist as a sanity
check of the multiple controls foundation support that does not have a user yet.
> In the second scenario, which is the region-aware MBA scenario, the regionX controllers are
> independent of the legacy MSR-based MSR, the legacy control is not emulated by the region-aware
> control, so in the current RFC v3 it fits well - the non-NULL msr_update will be invoked by
> either the legacy MSR-based control or the region-aware control.
> 
> The issue with the first scenario is that we don't have an indicator to tell fs/resctrl whether

ah - "we" is the x86 architecture driver. I think it will be helpful to your implementation if you
expand the view to also consider the implementation from user and resctrl filesystem perspective,
bonus if this view also considers the other features depending on multiple controls support.

> this legacy control is emulated by other controls. Although we have an emulated_ctrl list in each

Why does the architecture need to "tell" fs/resctrl how the emulation is managed?

> control, that list is re-used by the non-emulated control scenario such as region-aware RDT. How

What is wrong with that?

> about introducing a control flag to say that the legacy control must be emulated by other controls,
> rather than checking whether the control's msr_update is NULL or not in _resctrl_arch_update_domains()?
> 
>  if (!hw_ctrl->msr_update)
>     program_backing_controls()
> 
> to:
> 
>   if (hw_ctrl->emulated)
>     program_backing_controls()

All of the things mentioned above (msr_update, _resctrl_arch_update_domains(), the call of
"program_backing_controls()") are internal to the x86 architecture driver. I do not see
why the filesystem needs to know any of these internals. The x86 driver knows whether it is
dealing with "scenario 1" or "scenario 2", and the code you point out is what needs to know
which "scenario" it needs to deal with. This is all just private to the arch driver. What am
I missing?

The sample code already demonstrates how the x86 msr_update() can be used in the
region aware feature. It looks like there is a need for the x86 msr_update() to be more
generic not just to support region-aware MBA, but also GLBE:

	https://lore.kernel.org/lkml/6e440b7f-66db-4c4e-a6ac-2cb418739bad@amd.com/

Reinette


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
  2026-11-24  4:26   ` Reinette Chatre
@ 2026-11-25  5:10     ` Chen Yu
  2026-11-25 23:15       ` Reinette Chatre
  0 siblings, 1 reply; 7+ messages in thread
From: Chen Yu @ 2026-11-25  5:10 UTC (permalink / raw)
  To: Reinette Chatre
  Cc: Tony Luck, Ben Horgan, James Morse, Dave Martin, Babu Moger,
	Drew Fustini, Fenghua Yu, Jinjie Ruan, Borislav Petkov,
	Thomas Gleixner, Dave Hansen, Peter Newman,
	chen.yu@linux.dev x86@kernel.org, linux-kernel

Hi Reinette,

On Mon, Nov 23, 2026 at 08:26:50PM -0800, Reinette Chatre wrote:
> Hi Chenyu,
> 
> On 11/22/26 7:16 PM, Chen Yu wrote:
> > On Thu, Nov 19, 2026 at 09:04:26PM -0800, Reinette Chatre wrote:
> >> Hi Everybody,
> >>
> >> I believe that discussions around resctrl's upcoming support for multiple
> >> controls are starting to settle. This RFC aims to capture all the remaining
> >> items in implementation as well as documentation. Please point out to me if
> >> there is anything I missed.
> >>
> >> RFC v3 of this PoC can be found at:
> >> git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v3
> >>
> >> Please refer to the documentation patch for an overview of the planned interface
> >> changes as well as user space contracts/expectations:
> >>
> >> https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=95ff9ff7430095cb7264946c944c750315db73d9
> >>
> >> Remaining opens:
> >> ---------------
> >> - Ben: I do have a question about the formula used to determine the size of
> >>   a scalar cache control. Please see patch changelog of:
> >>   https://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git/commit/?h=resctrl/controls_rfc_v3&id=8695aab0997d5aa60e104374fae9701f51156c18
> >> - MPAM only compile tested.
> >> - The same x86 "SAMPLE" code as RFC v2 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 emulated and backing
> >>   controls. This is potentially something that needs to be managed by architecture
> >>   and thus potentially without a consistent failure to user space.
> >>
> >> Changes since RFC v2:
> >> --------------------
> >> RFC v2: https://lore.kernel.org/lkml/d258a32f-12d5-464d-abe9-4720fb3e44b3@intel.com/
> >>         git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v2
> >>
> >> User visible changes:
> >> - Make scope a property of the control again, now in addition to a separate
> >>   allocation scope of the resource. Expose the control scope via a new
> >>   per-control "scope" file (L2, L3, or NODE) that tells user space what a
> >>   domain ID in the schemata file represents. Needed to support AMD's GLBE
> >>   and CPU-less memory bandwidth allocation. (Ben and Babu)
> >> - Name controls according to the scheme agreed during RFC v2 discussions:
> >>   <resource>_<resource_scope><control_scope>_<control>, with the control
> >>   scope dropped when it matches the resource scope. MB and SMBA carry their
> >>   L3 scope only implicitly, so their new controls show it explicitly, for
> >>   example MB_L3_MAX, or MB_L3NODE for a default control at NODE scope.
> > 
> > This is a little different from the previous version. May I know the motivation
> > for displaying both the resource's alloc_scope and the control's scope? Is it
> > because AMD GLBE might have different granularity between the alloc_scope and the
> > control's scope, so we want to show it to userspace? Maybe we can add a section
> 
> Exactly. 
> 
> > in the document to mention this, as you described at [1]:
> > 
> > "resource scope":
> >         The scope of the resource object being allocated, that is, the
> >         hardware level at which the resource resides and is consumed, for
> >         example the L3 cache, memory bandwidth at L3 egress, or memory
> >         bandwidth at NUMA node ingress. The resource scope is part of the
> >         resource name and does not change the meaning of a domain ID.
> 
> Yes, I can add definitions for all the components of a control name (also resource
> and control).
>

Thanks for adding this, which could help the reader better understand the names.
 
> The "does not change the meaning of a domain ID" is not clear to me. We need

My intent was that the domain ID is determined only by the control scope, the resource
scope plays no role in it. It is OK to remove the above sentence if it causes confusion.

> to be careful here while integrating it with existing documentation where the
> domain ID is already tied to the resource instances.
>

OK. Regarding the existing documentation, I found one minor issue, perhaps.

diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
index d4a77858a959..d06087af4c61 100644
--- a/Documentation/filesystems/resctrl.rst
+++ b/Documentation/filesystems/resctrl.rst
@@ -1066,7 +1066,7 @@ only be produced if creation of a control or monitor group fails.

 Schemata files - general concepts
 ---------------------------------
-Each line in the file describes one resource. The line starts with
+Each line in the file describes one control of the resource. The line starts with

> > 
> > "control scope":
> >         The granularity at which the hardware is able to control the
> >         resource. One control value applies to one instance of the control
> >         scope, and the control scope determines what a domain ID in the
> >         schemata file represents. It is exposed via the control's "scope"
> >         file.
> 
> "One control value applies to one instance of the control scope" sounds strange.
> The control value allocates a portion of the resource at the scope of the control
> so having it "apply to an instance of the control scope" does not sound right, it
> applies to the resource, no?

Right, the final target is the resource.

> One useful test here is how it reads when applied to GLBE - where the control
> includes more than one instance of the resource, and referring to that as
> an instance of the control scope is not accurate.

OK, I see. GLBE is a good example: the control value applies to one or more instances
of the resource (1 instance represents 1 resource scope).

> > The resource scope and control scope are usually the same. They differ
> > when the resource is at one scope but the hardware is only able to
> > control it at another scope. Examples:
> > 
> > Intel RDT MBA:
> >         Resource:    Memory bandwidth leaving the L3 (egress).
> >         Granularity: One value per L3 domain. The value is a throttling
> >                      level applied to each CPU of the CLOS within the
> >                      domain - according to the spec, MBA control the speed
> >                      between L2 and L3.
> > 
> > Arm MPAM:
> >         Resource:    Memory bandwidth entering the memory of a NUMA node
> >                      (ingress), regardless of which CPU issued the request.
> >         Granularity: One value per NUMA node.
> > 
> > AMD GLBE:
> >         Resource:    L3 external bandwidth (egress).
> >         Granularity: One value per GLBE control domain (a NUMA node, or
> >                      the whole system with NPS4). The value is a ceiling
> >                      shared by all L3s in the domain. This is the example
> >                      that resource alloc_scope is different than the control
> >                      scope.
> 
> I prefer to defer the Arm MPAM NUMA and AMD GLBE examples to when those features
> land. These new features should introduce new sections in the documentation to
> describe them and the connections/terminology of controls can/should be used then.
> 

OK.

> As far as the Intel RDT MBA example goes, there is already the big section
> "Memory bandwidth Allocation and monitoring" that uses the term "L3 external
> bandwidth". We should be careful to not fragment the documentation by just pasting
> new sections but instead aim to integrated the information in relevant sections
> (if available).
> 

Agree.

> > 
> > BTW, can we provide a control flag that indicates whether the controller(even
> > the new controllers than the legacy ones) want to display the alloc_scope/control scope
> > via schemata? On v3, the region_aware schemata becomes:
> 
> This does not sound right. resctrl filesystem aims to establish a consistent naming
> convention with user space. The way I read this, you request a flag that an architecture can
> use to indicate whether it wants to follow that convention or not? resctrl filesystem
> aims to provide a generic and consistent interface to user space, irrespective of the
> architecture. Passing ownership of interface to architecture breaks this, no?
>

I was thinking if the resctrl filesystem can provide a fine-grained control naming
convention for the arch driver, so the arch driver can choose which option it prefers,
just like the resctrl_ctrl_name[] array is provided by resctrl and chosen by the arch driver.
I was just thinking that for some arch, exposing both the resource's alloc_scope and the
controller's scope seems to generate a long name/format. But it is OK to expose this for
all the new non-legacy controls.
 
> > > MB_L3_REGION0_OPT/MIN/MAX
> > 
> > previously it is:
> > 
> > MB_REGION0_OPT/MIN/MAX
> > 
> > On many platforms, the alloc_scope an scope are the same, and how about:
> > 
> > --- a/fs/resctrl/rdtgroup.c
> > +++ b/fs/resctrl/rdtgroup.c
> > @@ -5619,7 +5619,7 @@ static int gen_ctrl_suffix(struct rdt_resource *r, struct resctrl_ctrl *ctrl)
> >                  * the omission.
> >                  */
> >                 if (r->alloc_scope == ctrl->scope) {
> > -                       if (ctrl->name == RESCTRL_CTRL_NAME_DEF) {
> > +                       if (ctrl->name == RESCTRL_CTRL_NAME_DEF || !ctrl->show_scope) {
> >                                 ctrl->schema_suf[0] = '\0';
> >                                 return 0;
> >                         } else {
> > 
> > [1] https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/
> > 
> >>   https://lore.kernel.org/all/bccb1249-e722-451a-9c75-8aa846713045@intel.com/
> >> - Report "max" per domain in preparation for systems with resource
> >>   instances of different capacity. A bitmap's "max" no longer has a "0x"
> >>   prefix. (Drew and Tony)
> >> - Drop the "min_bits" file. The "min" file of a bitmap control now reports
> >>   the minimum number of consecutive bits.
> >> - Only offer, and only allow switching to, "native" control mode when the
> >>   resource has emulated controls. (Ben)
> > 
> > May I know how we can distinguish whether a legacy control can be emulated by
> > other controls?
> 
> There are a few characters in this discussion: the user, resctrl filesystem,
> the different architecture drivers. Which does the "we" in this question
> impersonate?
> 
> > 
> > There are two scenarios. The first scenario is that a legacy control is emulated
> > by sub-controllers, and the second scenario is that it is not emulated by any other
> > controllers.
> > 
> > In the first scenario, in the current code, after we switch from legacy -> native -> legacy
> > mode, the msr_update for the legacy control is non-NULL, so program_backing_controls() will
> > never be invoked again.
> 
> This is just what the "sample" code does to demonstrate some techniques the architecture
> driver can use. Please do not build on top of the sample patches. The architecture code _could_
> use similar techniques, but is not required to. It is *sample* code. There is no intention of
> upstreaming those patches. If you find them useful then you can copy/refactor them to make them
> appropriate for your use - in this situation just modify resctrl_arch_control_mode_set() to
> set msr_update() to NULL when the control mode switches to legacy (if that is the behavior the
> architecture needs).
> 
> Any feature needing multiple controls is welcome to copy some code from the sample patches,
> but all patches with "SAMPLE" prefix are expected to be dropped. They only exist as a sanity
> check of the multiple controls foundation support that does not have a user yet.

Yes, in the internal region-aware PoC, the sample code is replaced by the formal code.

> > In the second scenario, which is the region-aware MBA scenario, the regionX controllers are
> > independent of the legacy MSR-based MSR, the legacy control is not emulated by the region-aware
> > control, so in the current RFC v3 it fits well - the non-NULL msr_update will be invoked by
> > either the legacy MSR-based control or the region-aware control.
> > 
> > The issue with the first scenario is that we don't have an indicator to tell fs/resctrl whether
> 
> ah - "we" is the x86 architecture driver. I think it will be helpful to your implementation if you
> expand the view to also consider the implementation from user and resctrl filesystem perspective,
> bonus if this view also considers the other features depending on multiple controls support.
>

OK, I'm also thinking of the min/max/opt clamp among different controls. As you mentioned in the cover
letter, this logic can be embedded in fs/resctrl(by doing santity check in the staging buffer)
 
> > this legacy control is emulated by other controls. Although we have an emulated_ctrl list in each
> 
> Why does the architecture need to "tell" fs/resctrl how the emulation is managed?
> 
> > control, that list is re-used by the non-emulated control scenario such as region-aware RDT. How
> 
> What is wrong with that?
>

Sorry I overlooked the place where program_backing_controls() was introduced,
and did not describe it clearly/correctly. It is not the fs/resctrl
that needs to know the emulated control, but the arch driver. For example, I
looked at program_backing_controls() and thought that the core of this implementation
is to invoke the emulated control's hw_update if the legacy control's hw_update is
unavailable. As you mentioned, this is arch-related code, we can deal with this
without telling the fs/resctrl about it.
 
> > about introducing a control flag to say that the legacy control must be emulated by other controls,
> > rather than checking whether the control's msr_update is NULL or not in _resctrl_arch_update_domains()?
> > 
> >  if (!hw_ctrl->msr_update)
> >     program_backing_controls()
> > 
> > to:
> > 
> >   if (hw_ctrl->emulated)
> >     program_backing_controls()
> 
> All of the things mentioned above (msr_update, _resctrl_arch_update_domains(), the call of
> "program_backing_controls()") are internal to the x86 architecture driver. I do not see
> why the filesystem needs to know any of these internals.

fs/resctrl does not need to know this.

> The x86 driver knows whether it is
> dealing with "scenario 1" or "scenario 2", and the code you point out is what needs to know
> which "scenario" it needs to deal with. This is all just private to the arch driver. What am
> I missing?
>

No, you did not miss anything. After a second thought, for the region-aware RDT case,
we can switch msr_update between NULL and a valid hook to support only ONE scenario at
a time, and the arch driver knows it. Previously I was thinking of supporting both
scenarios at the same time, and the msr_update() NULL check cannot deal with that alone.

thanks,
Chenyu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
  2026-11-25  5:10     ` Chen Yu
@ 2026-11-25 23:15       ` Reinette Chatre
  0 siblings, 0 replies; 7+ messages in thread
From: Reinette Chatre @ 2026-11-25 23:15 UTC (permalink / raw)
  To: Chen Yu
  Cc: Tony Luck, Ben Horgan, James Morse, Dave Martin, Babu Moger,
	Drew Fustini, Fenghua Yu, Jinjie Ruan, Borislav Petkov,
	Thomas Gleixner, Dave Hansen, Peter Newman,
	chen.yu@linux.dev x86@kernel.org, linux-kernel

Hi Chenyu,

On 11/24/26 9:10 PM, Chen Yu wrote:
> On Mon, Nov 23, 2026 at 08:26:50PM -0800, Reinette Chatre wrote:
>> On 11/22/26 7:16 PM, Chen Yu wrote:
>>> On Thu, Nov 19, 2026 at 09:04:26PM -0800, Reinette Chatre wrote:

...

> 
> OK. Regarding the existing documentation, I found one minor issue, perhaps.
> 
> diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
> index d4a77858a959..d06087af4c61 100644
> --- a/Documentation/filesystems/resctrl.rst
> +++ b/Documentation/filesystems/resctrl.rst
> @@ -1066,7 +1066,7 @@ only be produced if creation of a control or monitor group fails.
> 
>  Schemata files - general concepts
>  ---------------------------------
> -Each line in the file describes one resource. The line starts with
> +Each line in the file describes one control of the resource. The line starts with
> 

Thank you very much for this. I am confident that there are many more changes needed
for the documentation to be consistent and coherent after the introduction of multiple
controls support.

>>>
>>> "control scope":
>>>         The granularity at which the hardware is able to control the
>>>         resource. One control value applies to one instance of the control
>>>         scope, and the control scope determines what a domain ID in the
>>>         schemata file represents. It is exposed via the control's "scope"
>>>         file.
>>
>> "One control value applies to one instance of the control scope" sounds strange.
>> The control value allocates a portion of the resource at the scope of the control
>> so having it "apply to an instance of the control scope" does not sound right, it
>> applies to the resource, no?
> 
> Right, the final target is the resource.
> 
>> One useful test here is how it reads when applied to GLBE - where the control
>> includes more than one instance of the resource, and referring to that as
>> an instance of the control scope is not accurate.
> 
> OK, I see. GLBE is a good example: the control value applies to one or more instances
> of the resource (1 instance represents 1 resource scope).

That is based on an assumption that the control scope is larger than the resource
scope, which I do not think is required.
...

>>>
>>> BTW, can we provide a control flag that indicates whether the controller(even
>>> the new controllers than the legacy ones) want to display the alloc_scope/control scope
>>> via schemata? On v3, the region_aware schemata becomes:
>>
>> This does not sound right. resctrl filesystem aims to establish a consistent naming
>> convention with user space. The way I read this, you request a flag that an architecture can
>> use to indicate whether it wants to follow that convention or not? resctrl filesystem
>> aims to provide a generic and consistent interface to user space, irrespective of the
>> architecture. Passing ownership of interface to architecture breaks this, no?
>>
> 
> I was thinking if the resctrl filesystem can provide a fine-grained control naming
> convention for the arch driver, so the arch driver can choose which option it prefers,
> just like the resctrl_ctrl_name[] array is provided by resctrl and chosen by the arch driver.
> I was just thinking that for some arch, exposing both the resource's alloc_scope and the
> controller's scope seems to generate a long name/format. But it is OK to expose this for
> all the new non-legacy controls.

resctrl filesystem controls the user interface - its goal is to present a generic interface
that user space can rely on to be consistent across all architectures. If there is any
preference, then it should come from the user, not from an architecture.

...

>>
> 
> OK, I'm also thinking of the min/max/opt clamp among different controls. As you mentioned in the cover
> letter, this logic can be embedded in fs/resctrl(by doing santity check in the staging buffer)

In the cover letter I was actually trying to convey that doing this reliably and consistently in
resctrl filesystem is difficult and leaning towards this being done by architecture. resctrl
filesystem should be able to handle relationships among controls if they support the same
control values, but that is not guaranteed. 

Consider, for example, the example of MPAM's min and max controls (I think region-aware may
have similar layout in legacy mode?):

info/
└── MB/
    └── schemata/
        ├── MB/
        │   └── MB_MAX/
        └── MB_MIN/

When in legacy mode user space can set new control values for the MB and MB_MIN controls - since
the MPAM driver manages the conversion from MB control value to MB_MAX control value it is not
obvious how resctrl filesystem can enforce the relationship.

For now I've just left it as-is - the filesystem allows user space to write a control value to
the MIN control that is larger than the control value written to MAX.

As noted this is still an open so we can discuss now as part of this RFC how best to handle this.

...  
 
> No, you did not miss anything. After a second thought, for the region-aware RDT case,
> we can switch msr_update between NULL and a valid hook to support only ONE scenario at
> a time, and the arch driver knows it. Previously I was thinking of supporting both
> scenarios at the same time, and the msr_update() NULL check cannot deal with that alone.
The solution as described is not clear to me but I am glad that you found a strategy to support
region-aware RDT with the new foundation provided here.

Reinette 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-25 23:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-20  5:04 [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept Reinette Chatre
2026-11-20 19:48 ` Fenghua Yu
2026-11-20 20:26   ` Reinette Chatre
2026-11-23  3:16 ` Chen Yu
2026-11-24  4:26   ` Reinette Chatre
2026-11-25  5:10     ` Chen Yu
2026-11-25 23:15       ` Reinette Chatre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®