From: Ben Horgan <ben.horgan@arm.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
Fenghua Yu <fenghuay@nvidia.com>, Tony Luck <tony.luck@intel.com>,
James Morse <james.morse@arm.com>,
Dave Martin <Dave.Martin@arm.com>,
Babu Moger <babu.moger@amd.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 v2] arm,x86,fs/resctrl: Generic schema description Proof of Concept
Date: Thu, 24 Sep 2026 15:38:00 +0100 [thread overview]
Message-ID: <05289411-7b6c-4f75-b811-e32348717ca4@arm.com> (raw)
In-Reply-To: <49d4132a-843f-4034-9bc0-0dbd351f8215@intel.com>
Hi Reinette,
On 23/09/2026 16:28, Reinette Chatre wrote:
> Hi Ben,
>
> On 9/21/26 9:53 AM, Ben Horgan wrote:
>> On 21/09/2026 17:06, Reinette Chatre wrote:
>>> On 9/21/26 3:22 AM, Ben Horgan wrote:
>>>> On 18/09/2026 23:47, Reinette Chatre wrote:
>
> ...>>>>
>>>>> Are you instead saying that resctrl should expose a node scoped control as that of a L3 scope control?
>>>>
>>>> The problem is that this already happens, for MPAM, in the degenerate case. This is the consequence
>>>> of allowing memory MSC to pretend to be L3 scoped MSC and so represented by the MB resource. This
>>>> only happens when there is a single L3 and a single NUMA node with no caches in between so that the
>>>> traffic at either end of the path is effectively equivalent and the scope for both is global as you
>>>> can't turn off the last CPU or the only NUMA node. In want of a better term, let's call this "L3 is
>>>> NUMA". These shenanigans are what lead to the complexity of having more that one MPAM class backing
>>>> a resource which we discuss at [1]. The need for the association is that, where possible, the memory
>>>> allocation and memory bandwidth counters are exposed to the user using the existing resctrl
>>>> interface and, as such, existing software will continue to work.
>>>>
>>>> What I was suggesting, is that in "native" mode we do away with any pretending. That is, memory MSC
>>>> always back resources with NODE scope even in the degenerate "L3 is NUMA" case. One benefit of this
>>>> is that the resctrl hierarchy can be more correct. I was about to write that a second benefit was
>>>> that if there is a L3 cache MPAM class and a memory MPAM class which both provide memory allocation
>>>> they could both be displayed in resctrl, MB and MB_NODE. The same consideration applies for memory
>>>> bandwidth counters. However, as the MPAM driver in the "L3 is NUMA" case, always chooses the L3 MPAM
>>>> class to back MB over other classes, the MPAM driver can just be extended to back MB_NODE with the
>>>> memory class that was not chosen. In this way it will works the same way as in the non-degenerate
>>>> cases and the same mechanism is in place for memory bandwidth counters.
>>>>
>>>> Hence, the only benefit would be a slightly closer description of the hardware in resctrl in the "L3
>>>> is NUMA" case. In performing this exercise of laying out my reasons for allowing the native/legacy
>>>> control to move things across resources I see it is unnecessary and so the native/legacy switch
>>>> should, as per your proposal, *not* move controls between resources. Thank you for your patience.
>>>>
>>>> [1] https://lore.kernel.org/linux-arm-kernel/0b0eef2d-ce3b-48c8-af08-5889e7396e4f@arm.com/
>>>
>>> If I understand correctly an "L3 is NUMA" would be presented to user space as:
>>>
>>> info/
>>> ├── MB/
>>> │ └── schemata/
>>> │ ├── MB/
>>> │ │ └── MB_L3_MAX/
>>> │ └── MB_L3_MIN/
>>> └── MB_NODE/
>>> └── schemata/
>>> ├── MB_NODE_MAX/
>>> └── MB_NODE_MIN/
>>>
>>> with the "MB" resource backed by the "L3 cache MPAM class" and the "MB_NODE" resource backed
>>> by the "memory MPAM class". Is this getting close?
>>
>> In the case when there is an L3 cache MPAM class and a memory MPAM class both support memory
>> bandwidth allocation then yes. However, I don't know of systems like this today and this isn't
>> dependent on the "L3 is NUMA". If there are multiple L3 and multiple NUMA nodes you would still get
>> this structure. It just relies on both the L3 cache MPAM class and the memory MPAM class supporting
>> bandwidth allocation (mbw_max/mbw_min). The "L3 is NUMA" is all about pretending a memory MPAM class
>> is a L3 cache MPAM class so that it fits into the existing expectations of the resctrl interface.
>
> I am missing something
>
> From earlier description ("... the complexity of having more that one MPAM class backing a resource
> which we discuss at [1]... ") I understood that "L3 is NUMA" scenario has two classes available and
> currently just uses one to back the MB resource. Further, that the new interface makes it possible
> for "the MPAM driver can just be extended to back MB_NODE with the memory class that was not chosen".
>
> Above seems to state that such systems that have two classes do not exist?
Hmmm, there is a distinction but I obviously haven't made clear. Let me expand on that here. You can
certainly have more than one MPAM class backing the monitors in a resource but each class backs
different monitors (mbm_total/llc_occupancy). As currently resctrl expects all monitors to be at the
L3 when the system allows it we "pretend" (this the "L3 is NUMA") and so the llc_occupancy counts
would be taken from the MPAM L3 class and mbm_total from the MPAM memory class. What doesn't
currently exist, but could, is a system where the MPAM L3 class and the MPAM memory class both
support memory bandwidth monitoring. Currently, in such a system the MB mbm_total will always be
backed by the MPAM L3 class and the memory bandwidth monitoring in the MPAM memory class would be
left unused. Once the MB_NODE support is introduced the unused bandwidth monitoring at the MPAM
memory class the mbm_total can be exposed there. Even once MB_NODE support is added we can continue
exposing mbm_total counters form the memory class as MB in the same case as before, they aren't
support in the L3 MPAM class and it's "L3 is NUMA" (single L3 and single NUMA with nothing inbetween).
It's similar for controls although the only control that we have currently that is effected is
maximum bandwidth, MB (MB_L3_MAX). If it's implemented if mbw_max is just at the L3 we expose it as
MB as would be expected and if mbw_max is just at the memory class, then if it's "L3 is NUMA" then
we can expose it. When MB_NODE is added this doesn't change but for a system with mbw_max at the L3
class and at the memory class the L3 version will be exposed at the MB resource and the memory
version at the MB_NODE. Each resource is only back by a single MPAM class and so we wouldn't have
e.g. MB_MAX provided by L3 class and MB_MIN provided by the memory class (These two controls also
have an interdependence in h/w so the behaviour may be confusing if they are split). In a system
with mbw_max at the L3 and cache occupancy at the L3 then the L3 class will back both the L3
resource and the MB resource.
>
> My concern is the impact on the user interface. When MPAM "stops pretending", could a system that
> exposes an MB resource before the new interface boot into new kernel with the new interface and no
> longer have an MB resource but instead just have an MB_NODE resource?
No, I did briefly entertain the idea of stopping pretending based on legacy/native view (which is
surely the source of some of the confusion) but anything that is currently exposed as a control or
monitor at the MB resource will stay for perpetuity at the MB resource. MPAM has no need to "stop
pretending". The only systems where the mbw_max control in the MPAM memory class is exposed as MB is
when there is no mbw_max control on the MPAM L3 class and its a "L3 is NUMA" system. If the MPAM L3
class can back "MB_L3_MAX" then it will. We should keep it this way.
When new controls are exposed to resctrl the MPAM driver will have to be careful to not break the
existing interface in the "L3 is NUMA" case.
On adding a new control e.g. mbw_min it will have to still be mbw_max that determines whether the
pretending occurs so the rules remain the same. If the L3 class supports mbw_max then it will always
back the MB resource and if the L3 class doesn't support mbw_max and it's a "L3 is NUMA" then if the
memory class supports mbw_max then the memory class backs MB. For the other cases MB can always be
backed by the L3 class and MB_NODE by the memory class. This for instance means that in, the
unlikely case of, an "L3 is NUMA" system which doesn't support mbw_max but supports mbw_min at the
memory class, then it will only every expose MIN at the MB_NODE resource, MB_MIN_NODE. I need to
revisit my patches exposing mbw_min to resctrl to make sure it never changes which class backs the
MB resource.
>
>>> It sounds to me as though both resources would be able to concurrently support monitoring so
>>> resctrl can be expected to expose NODE scoped memory bandwidth monitoring events retrieved from
>>> the "memory MPAM class" and L3 scoped memory bandwidth monitoring events retrieved from the
>>> "L3 cache MPAM class"?
>>
>> Yes. Unless we are in a "L3 is NUMA" setup to expose memory bandwidth counters from a memory MPAM
>> class they would need to have node scope and they could co-exist with other memory bandwidth
>> counters at L3 scope.
>
> It is starting to sound more and more that the new interfaces may result in user interface changes
> on MPAM systems?
No, we should definitely avoid the interface changing for the user (other than adding new things)
but please do call out if there is anything else that may cause that.
>
> Apologies but I do not think the MPAM plan is clear to me.
No worries, I hope I've made things at a bit clearer but please carry on asking where things are
still murky.
>>> So far I've viewed support for monitoring events at different scope as "after multiple controls"
>>> work that the "CPU-less NUMA nodes" depends on but looks like it is needed sooner.
>>
>> Why do you think it needs to be sooner rather than just a next step? Is there some contradiction or
>> incompatibility I'm missing. I thought that the monitors would just remain unexposed to resctrl
>> until there is an interface.
>
> No, you are not missing anything. My comment was based on my realization that the monitoring scope
> changes are needed by more systems than I originally thought.
Ok, yeah, all the MPAM MSC can have monitors and the ones at the memory bandwidth counters at the
memory are likely to be of particular interest.
Thanks,
Ben
>
> Reinette
next prev parent reply other threads:[~2026-09-24 14:38 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 5:26 Reinette Chatre
2026-08-05 16:59 ` Ben Horgan
2026-08-05 23:57 ` Reinette Chatre
2026-08-06 17:04 ` Luck, Tony
2026-08-06 17:11 ` Reinette Chatre
2026-08-07 14:14 ` Moger, Babu
2026-08-07 15:35 ` Reinette Chatre
2026-08-07 18:33 ` Moger, Babu
2026-08-07 22:53 ` Reinette Chatre
2026-08-10 18:52 ` Babu Moger
2026-08-11 4:06 ` Reinette Chatre
2026-08-11 14:59 ` Babu Moger
2026-08-11 15:30 ` Reinette Chatre
2026-08-11 16:09 ` Babu Moger
2026-08-24 14:40 ` Ben Horgan
2026-08-24 18:07 ` Reinette Chatre
2026-08-25 15:20 ` Ben Horgan
2026-08-07 15:35 ` Chen, Yu C
2026-08-07 17:57 ` Moger, Babu
2026-08-10 2:05 ` Chen, Yu C
2026-08-10 15:53 ` Reinette Chatre
2026-08-10 17:23 ` Chen, Yu C
2026-08-10 18:09 ` Reinette Chatre
2026-08-11 3:49 ` Chen, Yu C
2026-08-13 13:59 ` Chen Yu
2026-08-13 15:19 ` Reinette Chatre
2026-08-18 16:02 ` Chen Yu
2026-08-18 17:10 ` Reinette Chatre
2026-09-14 2:49 ` Chen Yu
2026-09-18 23:11 ` Reinette Chatre
2026-09-21 5:13 ` Chen, Yu C
2026-09-21 15:01 ` Reinette Chatre
2026-09-22 3:19 ` Chen, Yu C
2026-09-21 16:21 ` Luck, Tony
2026-08-10 2:55 ` Fenghua Yu
2026-08-10 3:02 ` Chen, Yu C
2026-08-10 3:25 ` Fenghua Yu
2026-08-10 5:24 ` Chen, Yu C
2026-08-10 15:53 ` Reinette Chatre
2026-08-17 15:09 ` Reinette Chatre
2026-09-11 10:09 ` Ben Horgan
2026-09-18 22:47 ` Reinette Chatre
2026-09-21 10:22 ` Ben Horgan
2026-09-21 16:06 ` Reinette Chatre
2026-09-21 16:53 ` Ben Horgan
2026-09-23 15:28 ` Reinette Chatre
2026-09-24 14:38 ` Ben Horgan [this message]
2026-09-21 13:56 ` [RFC PATCH 0/3] Suggestions for cache scalar controls Ben Horgan
2026-09-21 13:57 ` [RFC PATCH 1/3] fs/resctrl: Add schema_name to struct resctrl_ctrl Ben Horgan
2026-09-22 20:15 ` Drew Fustini
2026-09-23 9:05 ` Ben Horgan
2026-09-21 13:57 ` [RFC PATCH 2/3] fs/resctrl: Use correct schema name in bw_validate() last_cmd_status messages Ben Horgan
2026-09-21 13:57 ` [RFC PATCH 3/3] fs/resctrl: display size for scalar cache controls Ben Horgan
2026-09-21 14:08 ` [RFC PATCH 0/3] Suggestions for cache scalar controls Ben Horgan
2026-09-22 20:26 ` Drew Fustini
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=05289411-7b6c-4f75-b811-e32348717ca4@arm.com \
--to=ben.horgan@arm.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.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
all inboxes | Powered by JetHome®