mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: 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>,
	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: Wed, 23 Sep 2026 08:28:39 -0700	[thread overview]
Message-ID: <49d4132a-843f-4034-9bc0-0dbd351f8215@intel.com> (raw)
In-Reply-To: <f9d97f42-bfa0-4862-8494-7769b929ea52@arm.com>

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?

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?

>> 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?

Apologies but I do not think the MPAM plan is clear to me.
>> 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.

Reinette

  reply	other threads:[~2026-09-23 15:31 UTC|newest]

Thread overview: 54+ 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 [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=49d4132a-843f-4034-9bc0-0dbd351f8215@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.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=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®