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: Fri, 18 Sep 2026 15:47:36 -0700	[thread overview]
Message-ID: <94cb1f7b-0b78-4aec-8d57-7ae7e547cf36@intel.com> (raw)
In-Reply-To: <3f39918f-91c0-4411-88d2-1ab1db3f12d8@arm.com>

Hi Ben,

On 9/11/26 3:09 AM, Ben Horgan wrote:
> Hi Reinette, Fenghua,
> 
> A couple more thoughts on emulation.
> 
> On 10/08/2026 16:53, Reinette Chatre wrote:
>> Hi Fenghua,
>>
>> On 8/9/26 7:55 PM, Fenghua Yu wrote:
>>> On 8/3/26 22:26, Reinette Chatre wrote:
>>> With minor MPAM changes, I can do simple tests on MPAM:
>>> -               INIT_LIST_HEAD(&hw_ctrl->r_ctrl.emulated_by);
>>> +               INIT_LIST_HEAD(&mpam_ctrl->r_ctrl.emulated_by);
>>>
>>> -               INIT_LIST_HEAD(&hw_ctrl->r_ctrl.emulated_by);
>>> +               INIT_LIST_HEAD(&mpam_ctrl->r_ctrl.emulated_by);
>>>
>>> There is a branch resctrl/controls_rfc_v2.1. Seems no diff from controls_rfc_v2. Is either branch OK for base code?
>>
>> hmmm ... branch resctrl/controls_rfc_v2.1 should have the change you note above
>> and would be the right branch for you to use.
>> That is the only difference with resctrl/controls_rfc_v2.
>>
>>>
>>>  * @emulated_by:List of controls that emulate this control. When set the containing
>>>  *              struct resctrl_ctrl is likely a legacy control and @emulated_by
>>>  *              are the finer grained hardware controls used to back the legacy
>>>  *              control. This emulation is hidden from user in schemata file when
>>>  *              rdt_resource::ctrl_mode is RESCTRL_CTRL_MODE_LEGACY and
>>>  *              exposed when rdt_resource::ctrl_mode is
>>>  *              RESCTRL_CTRL_MODE_NATIVE.
>>>  */
>>> struct resctrl_ctrl {
>>> ...
>>>         struct list_head        emulated_by;
>>> };
>>>
>>> Does this mean a legacy resctrl control can be emulated by a few
>>> resctrl controls (which is stored in the list)?
>>>
>>> e.g. legacy MB control can be emulated by a few controls? I thought
>>> "MB:" line is emulated by only one native control. e.g. "MB:" line
>>> is emulated by "MB_NODE:" line.
>>
>> As Chenyu highlighted this is to support region-aware. 
>>
>> While I did originally suggest MB_NODE to emulate MB I learned from Ben just
>> how troublesome this can be. I am still trying to untangle how MPAM MSC and
>> AMD GLBE can be supported in this new interface. Could you please consider the
>> most recent message on this topic:
>> https://lore.kernel.org/lkml/bccb1249-e722-451a-9c75-8aa846713045@intel.com/
> 
> For the emulation of MB. I think in the case where the MPAM driver currently uses the memory class
> to back it (single L3/single NUMA node) then it would be most correct for the MB control to become
> MB_NODE_MAX when switching from legacy to native. As previously discussed, in the other case when MB
> is backed by a cache class then I don't think it makes sense for MB_NODE to emulate MB.
> 
> I'm wondering if it would be best to make the legacy/native switch a mount option (--native). By not
> being resource specific it allows controls to move between resources where that is appropriate. A

In the current design switching between legacy and native only involves changing which controls belonging
to a resource are exposed to user space. No matter if legacy or native is active the controls remain
associated with the same resource without ever changing the relationship between control and resource, nor
changing the relationship between controls. Practically speaking: the info file hierarchy does not change.

Moving controls between resources sounds like something entirely different and a significant new change.

So far the model has been for the architecture driver to own and "build" the resources, their associated
controls, and their control and monitoring domains. After the architecture establishes these relationships
the data is shared with resctrl fs but architecture driver always owns it. Letting resctrl fs make adjustments
to any of these relationships is unexpected to me. More so when this can change from mount to mount.

Changing the "shape" of a system seems to be something that the architecture should own?

Are you instead saying that resctrl should expose a node scoped control as that of a L3 scope control?

I aimed to document how I understand the different scopes and how to communicate this to user space in: 
	https://lore.kernel.org/lkml/bccb1249-e722-451a-9c75-8aa846713045@intel.com/

Are you instead saying that MPAM plans to create a control that pretends to be for a node scoped resource
but placed under the L3 scoped resource like below?

info/
└── MB/
    └── schemata/
        └── MB/
            └── MB_NODE_MAX/

Something like above does not follow the relationships that the hierarchy aims to communicate, which
is that the resource has L3 scope.

If you are already considering scenarios where user space would need new mount options, would you
perhaps consider instead some new command line parameter, similar to the existing "rdt=" ones that
adjust how resources are exposed? With something like this MPAM driver can control which "shape"
the system should have in resctrl.


> mount option would also allow multiple user programs to interact with the schemata and size files
> without worrying that the format would change under their feet. What do you think?
Reinette



      reply	other threads:[~2026-09-18 22:47 UTC|newest]

Thread overview: 38+ 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-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 [this message]

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=94cb1f7b-0b78-4aec-8d57-7ae7e547cf36@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®