public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Moger, Babu" <bmoger@amd.com>
To: Peter Newman <peternewman@google.com>, Babu Moger <babu.moger@amd.com>
Cc: corbet@lwn.net, tony.luck@intel.com, reinette.chatre@intel.com,
	tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, skhan@linuxfoundation.org,
	x86@kernel.org, Dave.Martin@arm.com, james.morse@arm.com,
	hpa@zytor.com, akpm@linux-foundation.org, rdunlap@infradead.org,
	dapeng1.mi@linux.intel.com, kees@kernel.org, elver@google.com,
	lirongqing@baidu.com, ebiggers@kernel.org, paulmck@kernel.org,
	seanjc@google.com, pawan.kumar.gupta@linux.intel.com,
	nikunj@amd.com, yazen.ghannam@amd.com, peterz@infradead.org,
	chang.seok.bae@intel.com, kim.phillips@amd.com,
	thomas.lendacky@amd.com, naveen@kernel.org,
	elena.reshetova@intel.com, xin@zytor.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	eranian@google.com
Subject: Re: [PATCH v2 2/8] x86/resctrl: Add RESCTRL_NPS_NODE scope for AMD NPS-aligned domains
Date: Tue, 28 Apr 2026 18:27:25 -0500	[thread overview]
Message-ID: <6905de19-cfc1-4dfa-b455-ba3e29d94d63@amd.com> (raw)
In-Reply-To: <CALPaoCgAq4gm-aqAriFCiHGBqY3Ryqrgj9QOMyj+wFA3FVkozg@mail.gmail.com>

Hi Peter,

On 4/28/2026 5:16 AM, Peter Newman wrote:
> Hi Babu,
> 
> On Fri, Apr 24, 2026 at 3:42 AM Babu Moger <babu.moger@amd.com> wrote:
>>
>> Global Memory Bandwidth Allocation (GMBA) control domains on AMD follow the
>> Nodes Per Socket (NPS) configuration. With NPS 4 there is a single domain
>> per package; otherwise the domain aligns with the NUMA node.

My mistake. It should be system wide. Confirmed with team also. Line 
from spec. Will fix it.

When configured, each NUMA node functions as an individual GLBE domain, 
except when the system is configured in NPS=4 mode in which case only a 
single GLBE domain exists which contains all QOS Domains in the system.


>>
>> By default, all QOS Domains in the system are included in a single GLBE
>> Control Domain. However, BIOS options may establish several GLBE Control
>> Domains within the system using NPS configuration. When configured, each
>> NUMA node functions as an individual GLBE domain, except when the system is
>> configured in NPS=4 mode in which case only a single GLBE domain exists
>> which contains all QOS Domains in the system.
> 
> The previous paragraph said NPS 4 is a single domain per package, not
> system-wide.
> 
>>
>> Add RESCTRL_NPS_NODE to enum resctrl_scope and implement
>> get_domain_id_nps().
>>
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> ---
>> v2: Add RESCTRL_NPS_NODE scope to add support for NPS-aligned resource.
>> ---
>>   arch/x86/kernel/cpu/resctrl/core.c | 20 ++++++++++++++++++++
>>   include/linux/resctrl.h            |  1 +
>>   2 files changed, 21 insertions(+)
>>
>> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
>> index 269265d98ad7..0f58f5e3b853 100644
>> --- a/arch/x86/kernel/cpu/resctrl/core.c
>> +++ b/arch/x86/kernel/cpu/resctrl/core.c
>> @@ -451,6 +451,24 @@ static int l3_mon_domain_mbm_alloc(u32 num_rmid, struct rdt_hw_l3_mon_domain *hw
>>          return -ENOMEM;
>>   }
>>
>> +/**
>> + * get_domain_id_nps() - Domain id for %RESCTRL_NPS_NODE (AMD NPS / GMBA)
>> + * @cpu:       CPU to query.
>> + *
>> + * Global memory bandwidth allocation (GMBA) control domains on AMD follow
>> + * the socket NPS layout. With NPS 4 there is a single control domain per
>> + * package, so every CPU maps to domain id 0. For other NPS settings the
>> + * domain matches the CPU's NUMA node.

Need to fix this text also.

>> + *
>> + * Return: 0 when NPS is 4, otherwise the NUMA node id for @cpu.
>> + */
>> +static int get_domain_id_nps(int cpu)
>> +{
>> +       if (topology_num_nodes_per_package() == 4)
>> +               return 0;
> 
> ID is 0 regardless of the number of packages, unlike the
> RESCTRL_PACKAGE case below?

Code is correct. Will fix the comments and commit message.

Thanks
Babu


  reply	other threads:[~2026-04-28 23:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24  1:41 [PATCH v2 0/8] x86/resctrl: Support for AMD Global (Slow) Memory Bandwidth Allocation Babu Moger
2026-04-24  1:41 ` [PATCH v2 1/8] x86,fs/resctrl: Add support for Global Bandwidth Enforcement (GLBE) Babu Moger
2026-04-24  1:41 ` [PATCH v2 2/8] x86/resctrl: Add RESCTRL_NPS_NODE scope for AMD NPS-aligned domains Babu Moger
2026-04-28 10:16   ` Peter Newman
2026-04-28 23:27     ` Moger, Babu [this message]
2026-04-24  1:41 ` [PATCH v2 3/8] x86/resctrl: Update control MSRs per L3 for NPS-scoped resources Babu Moger
2026-04-24  1:41 ` [PATCH v2 4/8] x86,fs/resctrl: Add the resource for Global Bandwidth Allocation Babu Moger
2026-04-24  1:41 ` [PATCH v2 5/8] fs/resctrl: Add the documentation for Global Memory " Babu Moger
2026-04-24  1:41 ` [PATCH v2 6/8] x86,fs/resctrl: Add support for Global Slow " Babu Moger
2026-04-24  1:41 ` [PATCH v2 7/8] x86,fs/resctrl: Add the resource " Babu Moger
2026-04-24  1:41 ` [PATCH v2 8/8] fs/resctrl: Add the documentation " Babu Moger
2026-04-29 22:34 ` [PATCH v2 0/8] x86/resctrl: Support for AMD Global (Slow) " Reinette Chatre
2026-04-30 23:04   ` Moger, Babu
2026-04-30 23:40     ` Reinette Chatre
2026-05-01 14:38       ` Moger, Babu

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=6905de19-cfc1-4dfa-b455-ba3e29d94d63@amd.com \
    --to=bmoger@amd.com \
    --cc=Dave.Martin@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=babu.moger@amd.com \
    --cc=bp@alien8.de \
    --cc=chang.seok.bae@intel.com \
    --cc=corbet@lwn.net \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=ebiggers@kernel.org \
    --cc=elena.reshetova@intel.com \
    --cc=elver@google.com \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=kees@kernel.org \
    --cc=kim.phillips@amd.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=mingo@redhat.com \
    --cc=naveen@kernel.org \
    --cc=nikunj@amd.com \
    --cc=paulmck@kernel.org \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peternewman@google.com \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=reinette.chatre@intel.com \
    --cc=seanjc@google.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    --cc=yazen.ghannam@amd.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