The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Babu Moger <babu.moger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
	Ben Horgan <ben.horgan@arm.com>, Fenghua Yu <fenghuay@nvidia.com>,
	Tony Luck <tony.luck@intel.com>,
	James Morse <james.morse@arm.com>,
	Dave Martin <Dave.Martin@arm.com>,
	Drew Fustini <fustini@kernel.org>, Chen Yu <yu.c.chen@intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Newman <peternewman@google.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept
Date: Tue, 21 Jul 2026 15:02:52 -0500	[thread overview]
Message-ID: <21e614b8-50fa-49e4-87c3-e6bdb4e83ab1@amd.com> (raw)
In-Reply-To: <08f016bc-2ba6-439e-bb3e-20061166402c@intel.com>

Hi Ben/Reinette,

On 7/21/26 12:30, Reinette Chatre wrote:
> Hi Ben,
> 
> On 7/21/26 6:23 AM, Ben Horgan wrote:
>> On 7/20/26 23:54, Reinette Chatre wrote:
>>> On 7/20/26 6:30 AM, Ben Horgan wrote:
> ...>
>> The former, info/ contains a directory for each allocation scope of each resource.
>>
>>
>>
>> info
>> ├── L2
>> │   ├── resource_schemata
>> │   │   ├── L2
>> │   │   ├── L2_CMAX
>> │   │   └── L2_CMIN
>> │   └── scope : L2
>> ├── L3
>> │   ├── resource_schemata
>> │   │   ├── L3
>> │   │   ├── L3_CMAX
>> │   │   └── L3_CMIN
>> │   └── scope : L3
>> ├── MB
>> │   ├── resource_schemata
>> │   │   ├── MB
>> │   │   │   └── MB_MAX
>> │   │   ├── MB_MIN
>> │   │   ├── MB_PBM
>> │   │   └── MB_PROP
>> │   └── scope : L3
>> └── MB_NODE
>>      ├── resource_schemata
>>      │   ├── MB_NODE_MAX
>>      │   ├── MB_NODE_MIN
>>      │   ├── MB_NODE_PBM
>>      │   └── MB_NODE_PROP
>>      └── scope : NUMA NODE
>>
> 
> At first glance this looks good to me. As you highlight below the nuances of how "Global S/MBA" can fit
> in here still needs to be worked out. One thing that resctrl may need to highlight when documenting this
> new capability is that while historically a resource had a matching schemata entry, this is no longer the
> case. As you show above some systems may have MB_NODE resource but no MB_NODE control while I expect that
> "Global MBA" (if it adopts this) may indeed have a MB_NODE resource with a MB_NODE control.
> 
>   
>> Please just consider this a mistake. MB_MAX should be a child of MB.
>>
>> info/
>> ├── MB
>> │   ├── resource_schemata
>> │   │   └── MB
>> │   │       └── MB_MAX
>> │   └── scope
>> └── MB_NODE
>>      ├── resource_schemata
>>      │   └── MB_NODE_MAX (Changed from MB_NODE)
>>      └── scope
> 
> ack.
> 
>>
>>>
>>> When thinking about MPAM, what would the underlying hardware control of "MB_NODE" be? It looks
>>> from above that it would either start out by itself having the properties of the underlying
>>> "MAX" control or is the plan to have it be a percentage based control backed by the
>>> underlying "MAX" hardware control?
>>
>> The underlying hardware of MB_NODE would be essentially the same hardware as that backing MB_MAX,
>> but at a different location in the SoC, at the memory controller rather than in the L3.
>>
>> To correct myself slightly, I don't think we should have a control called MB_NODE, rather, it should
>> be MB_NODE_MAX.
> 
> ack.
> 
>>
>> My understanding of previous discussions is that <resource_type>_<scope>_<control_type> it the
>> pattern for control names and the pattern for resource names being <resource_type>_<scope>.
>> (allowing for <scope> or <control_type> being missing to match existing naming.)
> 
> This is where discussions are from my view also.
> 
>>
>> I don't think we should introduce more percent based controls and for new controls we can introduce
>> a new format to describe them. Perhaps just the positive integer with a resolution supplied in info/
> 
> No, we should not introduce more percentage based controls per se. With the new schema format a
> percentage based control is just a variant of a proportional scalar control.
> 
>> as discussed previously. Although, I have been pondering on whether we can do a bit better.
>>
>> We could use hexadecimal point based format for controls which are a proportion of a resource and
>> have a resolution which is a power of 2. The advantage of this is that the meaning of the value is
>> independent of the granularity of the control (number of parts).
>>
>> 0 is represented as 0x0
>> 1 as                0x1
>> 1/2 as              0x0.8
>> 7/256 as            0x0.07
>> 1/2**28             0x0.00000001
>> etc
>>
>> This maps well to the MPAM fixed-point fraction point format without having the weirdness of having
>> values forced to 1 or 0 not being really 0. These MPAM h/w oddities can be hidden just by using the
>> mbw_min mbw_max of a control. In MPAM this could be used in CMIN, CMAX, MB_MAX, MB_MIN and I would
>> hope this would be useful for other architectures too. I am preparing some RFC patches on top of
>> your PoC for consideration of this idea and to explore some of the proposals discussed relating to
>> generic schemata and how they land in practice from the MPAM side.
> 
> I'm going to stand with Dave Martin [1] on this point with a preference to avoid floating point in
> resctrl input and output.
> Could you please elaborate where values are forced to 1 or 0? The new schema format was intentionally
> created to *avoid* rounding errors (and parsing complexity).
> 
> [1] https://lore.kernel.org/lkml/aNFliMZTTUiXyZzd@e133380.arm.com/
> 
>>> I also understand MPAM to support more memory bandwidth controls ("MIN", "HARDMAX"/"HARDLIM", etc.).
>>> Do you envision them to exist within info/MB/resource_schemata/<control> as well as within
>>> info/MB_NODE/resource_schemata/<control>?
>>
>> Yes, at least for MIN, see the info/ tree above. For HARDLIM, perhaps, but HARDLIM has the added
>> complications that it is a property of the MBW_MAX control and that it may be configurable for each
>> PARTID or a fixed property of the h/w. When HARDLIM is configurable the control name could be of the
>> form <resource_type>_<scope>_<control>_<control_param> where <control_param> is HARDLIM and the full
>> name for the HARDLIM configuration on the MB_NODE resource is MB_NODE_MAX_HARDLIM. There can also be
>> an info/<resource>/resource_schemata/<control>/lim file which has values, soft, hard, configurable.
> 
> ack. HARDLIM sounds like it would be a new control type. Perhaps a "boolean" type for which new control
> files need to be decided on? Sounds like you are headed in this direction and already have one control file
> in mind for this new type.
> 
> With this in mind the control could be built on top of what is being developed at the moment, possibly
> be presented to user space following Dave Martin's suggestion in
> https://lore.kernel.org/lkml/aO0Oazuxt54hQFbx@e133380.arm.com/:
> 
>   | MB_HARDMAX: 0=0, 1=1, 2=1, 3=0 [...]
> 
>   or
> 
>   | MB_HARDMAX: 0=off, 1=on, 2=on, 3=off [...]
> 
>>
>> For CMAX, maximum cache capacity, there is an equivalent control SOFTLIM, which behaves as HARDLIM
>> except the meaning of the bit is reversed. We can just use a consistent name in s/w though.
>>
>>>
>>>>
>>>> On an x86 system:
>>>>
>>>> info
>>>> ├── MB
>>>> │   ├── resource_schemata
>>>> │   │   ├── MB
>>>> │   │   └── MB_MAX (Finer grained MB, more below)
>>>> │   └── scope
>>>> └── MB_REGION
>>>>      ├── resource_schemata
>>>>      │   └── MB_REGION
>>>>      └── scope
>>>>
>>>>
>>>> Do you think this helps?
>>>
>>> "REGION" is not a new scope but instead region-aware MBA is controlled and manages bandwidth at L3 scope.
>>> Combine that with up to (currently) four regions each with three controls I find an interface like above
>>> potentially confusing to document in an intuitive way. Unless you are perhaps saying that we should introduce
>>> a new separate  "MB_REGION" L3 scope resource (so let resctrl support multiple "MB" resources at the same
>>> scope?) and then *it* contains the twelve new controls within its resource_schemata directory?
>>>
>>> Since the region-aware controls are orthogonal to the MSR based legacy control resctrl would still need a
>>> way for user space to switch from one to the other which implies a dependency between "MB" and "MB_REGION"
>>> that is not presented in above hierarchy.
>>
>> OK. The /sys/fs/resctrl/info/MB/schemata/mode and the MB_REGION controls a child of MB you described
>> previously seem s better fit than what I suggested.
> 
> ok, I'll keep following that.
> 
>>
>>>
>>> I think I am missing quite a bit here as I try to navigate an interface so different from what we have
>>> discussed so far.
>>> I would like to explore with more detail how this interface can handle the different scenarios we have
>>> discussed so far.
>>
>> Certainly, I don't think we have got to the bottom of this yet.
>>
>>>
>>> The other x86 feature to consider is AMD's upcoming "Global" MBA/SMBA that exposes memory bandwidth allocation
>>> in "groups of L3" that I understand could usually be mapped to NODE scope (but it remains controlled at L3 scope),
>>> except for one configuration where it is "SYSTEM"(?) scope.
>>> Ref.: https://lore.kernel.org/lkml/8f77f498b1c77fa8fd8f5d5687f03ae598068544.1776980182.git.babu.moger@amd.com/
>>
>> Hmmm, I'm not sure that the scope can be considered to be NODE scope for GMBA. To me it seems to be
>> accidental that it maps to the NUMA node but really the scope is just a grouping of L3 instances.
>> For a control to NUMA scope I would expect the resctrl domains to go offline and online in sync with
>> the NUMA nodes. For GMBA it looks like it would just going offline/online based on whether any of
>> the CPUs and so L3 instances in the group are online. Am I correct here?
>>
>> Assuming the domains are on L3 groups rather than NUMA also changes which end of the link the
>> traffic is regulated and so how cross-NUMA traffic behaves differently. If the domain is an L3 group
>> then a task running on a CPU affine to that L3 group won't be throttled unless that particular
>> domain is throttled but with NUMA node domains it may be throttled if it has traffic going to that
>> domain.
> 
> I'll defer to Babu for accurate answers about this hardware capability.
> 

To me, Global MBA should be considered a NODE-scoped resource. In some 
configurations it may appear as SYSTEM-scoped, but that is effectively 
equivalent to a single-node encompassing the entire system. In such 
cases, there is only one schemata entry controlling the whole system.

Yes, multiple L3 instances are grouped together to form a NODE. 
Internally, programming is still performed at the L3 level, but that 
implementation detail can be hidden from users and does not need to be 
exposed through the interface.

Thanks
Babu

>>>
>>>>
>>>> This also brings another question. On MPAM systems the 'MB_MAX' is backed by the same MSC h/w as MB
>>>> but it exposed a different interface to the user. If I understand correctly intel have an option to
>>>> have finer grained control of MB (delay) as well and so it would make sense to use a common name
>>>> rather than just going for the MPAM centric name of MB_MAX.
>>>
>>> Apologies but I was not able to parse above.
>>
>> Ok, let me try to explain again (although it's probably not what we want to do). My intent here was
>> to try and explore whether we can reuse naming and controls across architectures in the same way we
>> already have for the L2/L3 cache portion bitmap and the existing MB control.
>>
>> To quote from a previous mail of yours:
>> https://lore.kernel.org/lkml/a84af037-6439-4362-be07-d45143e06309@intel.com/
>> """
>>    For example, on an MPAM system (if I understand correctly) the user may see:
>>    info/
>>    └── MB/
>>        └── resource_schemata/
>>            ├── MB/
>>            │   └── MB_MAX/
>>            └── MB_MIN/
>>
>>    Compared with a possible implementation on Intel that looks like:
>>    info/
>>    └── MB/
>>        └── resource_schemata/
>>            ├── MB/
>>            │   └── MB_OPT/
>>            ├── MB_MAX/
>>            └── MB_MIN/
>> """
>>
>> In the two setups MPAM MB_MAX and intel MB_OPT play the same role, a finer grained control of the
>> legacy MB control. I was thinking these could share a name (MB-PRECISE), but it probably doesn't
>> make sense as MB_OPT and MB_MAX have different relationships to MB_MIN.
>>
> Apologies, I neglected to follow up on this after I clarified internally which RDT control should
> actually be used to emulate the percentage based control. My original thoughts that you highlight
> above is not correct the RDT also plans to use the "MAX" underlying hardware control for the
> percentage based MB control. With this RDT and MPAM should look more similar with RDT simplified
> (by dropping the region-aware terms) as:
> 
>     info/
>     └── MB/
>         └── resource_schemata/
>             ├── MB/
>             │   └── MB_MAX/
>             ├── MB_OPT/
>             └── MB_MIN/
> 
> 
> Reinette
> 


  reply	other threads:[~2026-07-21 20:02 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 18:06 [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept Reinette Chatre
2026-06-02 20:23 ` Babu Moger
2026-06-02 22:56   ` Reinette Chatre
2026-06-03  1:14     ` Moger, Babu
2026-06-03  3:55       ` Reinette Chatre
2026-06-03 14:40         ` Babu Moger
2026-06-02 23:32 ` Chen, Yu C
2026-06-03  3:45   ` Reinette Chatre
2026-06-03 11:53     ` Chen, Yu C
2026-06-04 16:37       ` Reinette Chatre
2026-06-05 15:43         ` Chen, Yu C
2026-06-05 16:20           ` Reinette Chatre
2026-06-03 15:15 ` Ben Horgan
2026-06-03 19:34   ` Drew Fustini
2026-06-04 11:24     ` Ben Horgan
2026-06-04 17:38       ` Drew Fustini
2026-06-12  1:30         ` Shaopeng Tan (Fujitsu)
2026-06-17 15:29           ` Reinette Chatre
2026-06-19  1:42             ` Shaopeng Tan (Fujitsu)
2026-06-22 16:10               ` Reinette Chatre
2026-06-23  5:04                 ` Shaopeng Tan (Fujitsu)
2026-06-04 21:05     ` Reinette Chatre
2026-06-05 19:35       ` Drew Fustini
2026-06-06  5:10         ` Drew Fustini
2026-06-06  5:23           ` Drew Fustini
2026-06-04 17:43   ` Reinette Chatre
2026-06-05 14:53     ` Ben Horgan
2026-06-05 15:39       ` Reinette Chatre
2026-06-05 16:37         ` Ben Horgan
2026-06-08 16:16           ` Reinette Chatre
2026-06-09 10:10             ` Ben Horgan
2026-06-09 15:28               ` Reinette Chatre
2026-06-09 16:37                 ` Ben Horgan
2026-06-09 17:41                   ` Reinette Chatre
2026-06-10  7:09                     ` Chen, Yu C
2026-06-10 14:27                       ` Chen, Yu C
2026-06-10 16:13                         ` Reinette Chatre
2026-06-10 17:57                           ` Chen, Yu C
2026-06-10 18:10                             ` Reinette Chatre
2026-06-10 15:59                       ` Reinette Chatre
2026-06-10 18:05                         ` Chen, Yu C
2026-06-11  3:26                         ` Chen, Yu C
2026-06-11 15:45                           ` Reinette Chatre
2026-06-26 15:46                             ` Chen, Yu C
2026-07-02 14:27                               ` Ben Horgan
2026-07-03  9:01                                 ` Chen, Yu C
2026-07-14 21:37                               ` Reinette Chatre
2026-07-15  2:49                                 ` Chen, Yu C
2026-06-10  4:31                 ` Drew Fustini
2026-06-10 15:14                   ` Reinette Chatre
2026-06-03 18:46 ` Luck, Tony
2026-06-04 10:02   ` Ben Horgan
2026-06-04 21:42   ` Reinette Chatre
2026-07-08 12:56     ` Chen, Yu C
2026-07-14 21:39       ` Reinette Chatre
2026-06-03 22:14 ` Drew Fustini
2026-06-04 21:47   ` Reinette Chatre
2026-06-05 19:48     ` Drew Fustini
2026-06-15 21:05 ` Moger, Babu
2026-06-17 17:18   ` Reinette Chatre
2026-06-17 20:29     ` Babu Moger
2026-06-24 19:08 ` Fenghua Yu
2026-06-24 22:22   ` Reinette Chatre
2026-06-25  1:26     ` Fenghua Yu
2026-06-25 15:43       ` Reinette Chatre
2026-07-10 20:59         ` Fenghua Yu
2026-07-14 22:06           ` Reinette Chatre
2026-07-15  8:34             ` Ben Horgan
2026-07-15 15:41               ` Reinette Chatre
2026-07-16 14:59                 ` Ben Horgan
2026-07-16 16:02                   ` Luck, Tony
2026-07-16 16:22                     ` Ben Horgan
2026-07-16 17:50                       ` Reinette Chatre
2026-07-17 10:27                         ` Ben Horgan
2026-07-16 16:04                   ` Reinette Chatre
2026-07-16 16:44                     ` Ben Horgan
2026-07-16 17:07                       ` Reinette Chatre
2026-07-17 12:20                         ` Ben Horgan
2026-07-17 16:00                           ` Reinette Chatre
2026-07-20 13:30                             ` Ben Horgan
2026-07-20 22:54                               ` Reinette Chatre
2026-07-21 13:23                                 ` Ben Horgan
2026-07-21 17:30                                   ` Reinette Chatre
2026-07-21 20:02                                     ` Babu Moger [this message]
2026-07-22 10:47                                       ` Ben Horgan
2026-07-22 17:02                                         ` Babu Moger
2026-08-04  9:11                                           ` Ben Horgan
2026-08-04 14:09                                             ` Babu Moger
2026-08-04 15:11                                               ` Ben Horgan
2026-08-04 19:51                                                 ` Babu Moger
2026-08-05  6:06                                                 ` Reinette Chatre
2026-08-06  9:24                                                   ` Ben Horgan
2026-08-07 22:53                                                     ` Reinette Chatre
2026-07-22 10:03                                     ` Ben Horgan
2026-07-22 16:32                                       ` Reinette Chatre
2026-07-23  7:58                                         ` Ben Horgan
2026-07-23 15:52                                           ` Reinette Chatre
2026-07-23 22:08                                   ` Fenghua Yu
2026-07-27  9:13                                     ` Ben Horgan
2026-07-17 16:02                     ` Chen, Yu C
2026-07-17 16:55                       ` Reinette Chatre
2026-07-23  0:17             ` Fenghua Yu
2026-07-23 16:18               ` Reinette Chatre
2026-07-23 22:27                 ` Fenghua Yu
2026-07-23 23:31                   ` Reinette Chatre
2026-07-02 13:37       ` Ben Horgan
2026-07-02 15:16         ` Fenghua Yu
2026-07-03 13:42           ` Ben Horgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21e614b8-50fa-49e4-87c3-e6bdb4e83ab1@amd.com \
    --to=babu.moger@amd.com \
    --cc=Dave.Martin@arm.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghuay@nvidia.com \
    --cc=fustini@kernel.org \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox