mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Moger, Babu" <bmoger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
	"Luck, Tony" <tony.luck@intel.com>
Cc: Ben Horgan <ben.horgan@arm.com>,
	James Morse <james.morse@arm.com>,
	Dave Martin <Dave.Martin@arm.com>,
	Babu Moger <babu.moger@amd.com>,
	Drew Fustini <fustini@kernel.org>,
	Fenghua Yu <fenghuay@nvidia.com>, Chen Yu <yu.c.chen@intel.com>,
	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, 7 Aug 2026 13:33:28 -0500	[thread overview]
Message-ID: <81f465d7-d12f-4414-9824-85d3cba5a36b@amd.com> (raw)
In-Reply-To: <bc22b70e-7058-4aa7-9c61-669ec76efd0f@intel.com>

Hi Reinette/Ben,

On 8/7/2026 10:35 AM, Reinette Chatre wrote:
> Hi Babu,
> 
> On 8/7/26 7:14 AM, Moger, Babu wrote:
>> On 8/6/2026 12:11 PM, Reinette Chatre wrote:
>>> On 8/6/26 10:04 AM, Luck, Tony wrote:
>>>> On Wed, Aug 05, 2026 at 04:57:04PM -0700, Reinette Chatre wrote:
>>>>> On 8/5/26 9:59 AM, Ben Horgan wrote:
>>>>>> Just given a go at running this on a model with MPAM and I can mount resctrl with this
>>>>>> small patch to initialise the emulated_by lists so that list_empty() behaves.
>>>>>>
>>>>>> diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c
>>>>>> index 21dcbf5764cc..638095649151 100644
>>>>>> --- a/drivers/resctrl/mpam_resctrl.c
>>>>>> +++ b/drivers/resctrl/mpam_resctrl.c
>>>>>> @@ -1018,6 +1018,7 @@ static int mpam_resctrl_control_init(struct mpam_resctrl_res *res)
>>>>>>           case RDT_RESOURCE_L3:
>>>>>>                   mpam_ctrl->r_ctrl.type = RESCTRL_CTRL_BITMAP;
>>>>>>                   mpam_ctrl->r_ctrl.name = RESCTRL_CTRL_NAME_DEF;
>>>>>> +               INIT_LIST_HEAD(&mpam_ctrl->r_ctrl.emulated_by);
>>>>>>                   INIT_LIST_HEAD_RCU(&mpam_ctrl->r_ctrl.domains);
>>>>>>                   __set_bit(RESCTRL_BITMAP_FLAG_SPARSE, mpam_ctrl->r_ctrl.bitmap.flags);
>>>>>>                   mpam_ctrl->r_ctrl.bitmap.cbm_len = class->props.cpbm_wd;
>>>>>> @@ -1048,6 +1049,7 @@ static int mpam_resctrl_control_init(struct mpam_resctrl_res *res)
>>>>>>                   r->ctrl_scope = RESCTRL_L3_CACHE;
>>>>>>                   mpam_ctrl->r_ctrl.type = RESCTRL_CTRL_SCALAR;
>>>>>>                   mpam_ctrl->r_ctrl.name = RESCTRL_CTRL_NAME_DEF;
>>>>>> +               INIT_LIST_HEAD(&mpam_ctrl->r_ctrl.emulated_by);
>>>>>>                   INIT_LIST_HEAD_RCU(&mpam_ctrl->r_ctrl.domains);
>>>>>>
>>>>>>                   r->bw_throttle_mode = THREAD_THROTTLE_UNDEFINED;
>>>>>
>>>>> Thank you for this. Added this and it is now available in branch resctrl/controls_rfc_v2.1
>>>>
>>>> Is same needed for x86? I don't see any initialization of the
>>>> "r_ctrl.emulated_by" lists in similar initialization functions.
>>> x86 "emulated_by" list initialization should be in both branches.
>>>
>>> Branch resctrl/controls_rfc_v2.1 combined all "emulated_by" list initialization
>>> (for x86 and MPAM) into commit:
>>> 3407e523c988 ("fs/resctrl: Introduce emulated controls and control mode")
>>>
>>> In the original resctrl/controls_rfc_v2 the x86 "emulated_by" list initialization can
>>> be found in commit fbed64f80515 ("x86/resctrl: SAMPLE: Emulated controls")
>>>
>>
>> Looking at the commit:
>>
>> commit 3407e523c988 ("fs/resctrl: Introduce emulated controls and control mode")
>>
>> Based on the patch description, emulated controls are intended to be
>> used only when there is a difference between the native and legacy
>> controls. If no such difference exists, both modes should operate
>> identically.
> 
> The original AMD MBA enabling did not follow the original percentage based MBA
> control so resctrl essentially has *two* "legacy" MB controls today: one for AMD
> and one for Intel, MPAM, and RISC-V (planned afaik). That cannot be changed now.
> AMD would continue to expose the MB control that is not the percentage based "legacy"
> control but actually AMD's native control. In short, yes, on AMD's "MB" control
> the "legacy" and "native" control modes should operate identically.
> At least now users could use the files in info/MB/schemata/MB/* to learn the
> properties of the control.
>> For MBA(AMD) and GMBA, there does not appear to be any difference
>> between the two modes. Is that understanding correct?
> It is not clear to me how resctrl should support AMD's GLBE. Note I am intentionally
> not using GMBA since that already makes an assumption on how resctrl will support this.
> Do you perhaps have an answer for Ben's question in
> https://lore.kernel.org/lkml/1444b515-752e-4167-87f5-30ace189e05c@arm.com/ ?

Yes. We are already at RFC v2. Let me respond here. Please see my 
response below.

> 
> GLBE claims to enable users to allocate memory bandwidth at node scope but the memory
> is managed at L3. This results in scenarios where, for example, a NUMA node can be
> online and used but resctrl cannot expose it for bandwidth allocation when all the CPUs
> at that NUMA node scope are offline. GLBE is thus not actually allocating memory bandwidth
> at the NUMA node.

Yea. That is correct.

There are a couple of key differences when compared to the pure NUMA scope.

1. In some cases, a NUMA node is treated as the entire system.

  
https://lore.kernel.org/lkml/8f77f498b1c77fa8fd8f5d5687f03ae598068544.1776980182.git.babu.moger@amd.com/

2. When a user updates the settings on a GLBE for a specific node, we 
need to update the MSRs within that node at the L3 scope:

https://lore.kernel.org/lkml/a2a06bd290e68f902be9e7cc3ad35f0a2211b950.1776980182.git.babu.moger@amd.com/


Considering these differences, I think we should probably treat GLBE 
separate from MB_NODE scope. What do you think?


> 
> Should resctrl prepare for some future where an AMD system may support memory bandwidth
> allocation at the NUMA node while also supporting GLBE (memory bandwidth allocation at L3)?

No, I don't believe that's the case. At least, I haven't come across any 
information suggesting that.

Thanks,
Babu

  reply	other threads:[~2026-08-07 18:33 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 [this message]
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
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=81f465d7-d12f-4414-9824-85d3cba5a36b@amd.com \
    --to=bmoger@amd.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=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®