From: Fenghua Yu <fenghuay@nvidia.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
Tony Luck <tony.luck@intel.com>, Ben Horgan <ben.horgan@arm.com>,
James Morse <james.morse@arm.com>,
Dave Martin <Dave.Martin@arm.com>,
Shaopeng Tan <tan.shaopeng@fujitsu.com>,
Chen Yu <yu.c.chen@intel.com>, Babu Moger <babu.moger@amd.com>,
Drew Fustini <fustini@kernel.org>,
Vikram Sethi <vsethi@nvidia.com>,
Shanker Donthineni <sdonthineni@nvidia.com>,
Newton Liu <newtonl@nvidia.com>, Gavin Shan <gshan@redhat.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Fenghua Yu <fenghuay@nvidia.com>
Subject: [PATCH 19/23] Documentation: arm64: mpam: document memory-level MB control and NUMA nodes
Date: Thu, 16 Jul 2026 14:03:09 -0700 [thread overview]
Message-ID: <20260716210329.2914625-19-fenghuay@nvidia.com> (raw)
In-Reply-To: <cover.1784217438.git.fenghuay@nvidia.com>
The MB control can be backed by a memory-level MSC above L3 rather than
the L3 cache MSC. In that case resctrl identifies domains by NUMA node id
instead of L3 cache id, exposes a node-scoped MB_NODE control, and can
manage CPU-less memory nodes by falling back to cpu_possible_mask.
Update the arm64 MPAM documentation to describe the L3-cache and memory
MSC paths for both the MB control and MBWU monitoring, how to tell them
apart via the control "scope" file, how NUMA node ids map to
/sys/devices/system/node/node*/, and CPU-less NUMA node handling.
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
---
Documentation/arch/arm64/mpam.rst | 105 +++++++++++++++++++-----------
1 file changed, 68 insertions(+), 37 deletions(-)
diff --git a/Documentation/arch/arm64/mpam.rst b/Documentation/arch/arm64/mpam.rst
index 67fe515ed501..88ddee8705e4 100644
--- a/Documentation/arch/arm64/mpam.rst
+++ b/Documentation/arch/arm64/mpam.rst
@@ -44,48 +44,79 @@ The supported features are:
placement.
* Memory bandwidth maximum controls (MBW_MAX) on or after the L3 cache.
- resctrl uses the L3 cache-id to identify where the memory bandwidth
- control is applied. For this reason the platform must have an L3 cache
- with cache-id's supplied by firmware. (It doesn't need to support MPAM.)
-
- To be exported as the 'MB' schema, the topology of the group of MSC chosen
- must match the topology of the L3 cache so that the cache-id's can be
- repainted. For example: Platforms with Memory bandwidth maximum controls
- on CPU-less NUMA nodes cannot expose the 'MB' schema to resctrl as these
- nodes do not have a corresponding L3 cache. If the memory bandwidth
- control is on the memory rather than the L3 then there must be a single
- global L3 as otherwise it is unknown which L3 the traffic came from. There
- must be no caches between the L3 and the memory so that the two ends of
- the path have equivalent traffic.
-
- When the MPAM driver finds multiple groups of MSC it can use for the 'MB'
- schema, it prefers the group closest to the L3 cache.
+ resctrl exposes these as the ``MB`` resource. The domain identifiers
+ used in the ``MB:`` schemata line depend on which MSC group backs the
+ resource:
+
+ **L3-cache MSC (cache-level MB control).**
+ When the MB control hardware sits on the L3 cache MSC, resctrl uses L3
+ cache-ids to identify where bandwidth is applied. The topology of the
+ MSC group must match the L3 cache topology so that cache-ids can be
+ repainted. If the memory bandwidth control is on the memory rather
+ than the L3 then there must be a single global L3 as otherwise it is
+ unknown which L3 the traffic came from. There must be no caches
+ between the L3 and the memory so that the two ends of the path have
+ equivalent traffic.
+
+ **Memory MSC (memory-level MB control).**
+ When the MB control hardware sits on a memory MSC above L3, resctrl uses
+ NUMA node identifiers instead of L3 cache-ids. The native node-scoped
+ control is exposed as ``MB_NODE``; the legacy ``MB`` control keeps the
+ ``MB:`` schemata line for backward compatibility and, in the default
+ legacy mode, is emulated by ``MB_NODE`` when it has no hardware of its
+ own. See the MB control emulation section in
+ Documentation/filesystems/resctrl.rst for the control layout and
+ emulation modes.
+
+ On either path, read the control ``scope`` file under
+ ``info/MB/resource_schemata/`` (``L3`` or ``NODE``) to learn which
+ identifier space the ``MB:`` line uses.
+
+ When ``scope`` reads ``NODE``, each numeric ID ``XX`` in the ``MB:``
+ line is a NUMA node id and corresponds to the standard NUMA node
+ directory ``/sys/devices/system/node/nodeXX/``. That directory
+ describes the node: ``cpulist``/``cpumap`` (the CPUs local to it, empty
+ for a CPU-less node), ``distance`` (NUMA distances to other nodes),
+ ``meminfo`` (its memory), and its ``memoryX`` symlinks. Use these
+ files to map an ``MB:`` (or ``MB_NODE:``) entry to a physical NUMA node
+ and its CPUs and memory.
+
+ **CPU-less NUMA nodes.**
+ A memory MSC may be associated with a NUMA node that has no local CPUs
+ (for example a memory-only node that still participates in bandwidth
+ control). The driver falls back to ``cpu_possible_mask`` for the MSC
+ affinity so that traffic from remote CPUs is still accounted for and
+ the node can appear as an ``MB``/``MB_NODE`` domain.
+
+ When the MPAM driver finds multiple groups of MSC it can use for the
+ ``MB`` resource, it prefers the group closest to the L3 cache.
* Cache Storage Usage (CSU) counters can expose the 'llc_occupancy' provided
there is at least one CSU monitor on each MSC that makes up the L3 group.
Exposing CSU counters from other caches or devices is not supported.
-* Memory Bandwidth Usage (MBWU) on or after the L3 cache. resctrl uses the
- L3 cache-id to identify where the memory bandwidth is measured. For this
- reason the platform must have an L3 cache with cache-id's supplied by
- firmware. (The platform doesn't need to support MPAM.)
-
- Memory bandwidth monitoring makes use of MBWU monitors in each MSC that
- makes up the L3 group. If the memory bandwidth monitoring is on the memory
- rather than the L3 then there must be a single global L3 as otherwise it
- is unknown which L3 the traffic came from.
-
- To expose 'mbm_total_bytes', the topology of the group of MSC chosen must
- match the topology of the L3 cache so that the cache-id's can be
- repainted. For example: Platforms with Memory bandwidth monitors on
- CPU-less NUMA nodes cannot expose 'mbm_total_bytes' as these nodes do not
- have a corresponding L3 cache. 'mbm_local_bytes' is not exposed as MPAM
- cannot distinguish local traffic from global traffic.
-
- All these restrictions based on L3 cache are due to resctrl, currently, only
- supporting monitoring at the L3 scope. It is expected that going forward more
- MBWU monitors can be exposed to the user after support for more monitoring
- scopes is added to resctrl.
+* Memory Bandwidth Usage (MBWU) on or after the L3 cache. resctrl can
+ expose ``mbm_total_bytes`` from either an L3-cache MSC or a memory MSC:
+
+ **L3-cache MSC.**
+ When MBWU monitors sit on the L3 cache MSC, counters are exposed on the
+ ``L3_MON`` resource and use L3 cache-ids. The MSC group topology must
+ match the L3 cache topology so that cache-ids can be repainted.
+
+ **Memory MSC.**
+ When MBWU monitors sit on a memory MSC above L3, counters are exposed on
+ the ``MB`` resource with node scope. Monitor directories are named
+ ``mon_NODE_XX`` where ``XX`` is the same NUMA node identifier that appears
+ in the ``MB:`` schemata line. CPU-less memory nodes are supported the
+ same way as for MB controls above.
+
+ ``mbm_local_bytes`` is not exposed as MPAM cannot distinguish local
+ traffic from global traffic on these paths.
+
+ When only L3-scoped monitoring was supported, platforms with memory
+ bandwidth monitors on CPU-less NUMA nodes could not expose
+ ``mbm_total_bytes``. Node-scoped monitoring on the ``MB`` resource
+ removes that restriction for memory-class MSCs.
Reporting Bugs
==============
--
2.43.0
next prev parent reply other threads:[~2026-07-16 21:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 21:02 [PATCH RFC 00/23] resctrl: MBA control emulation and ARM MPAM MB_NODE support Fenghua Yu
2026-07-16 21:02 ` [PATCH 01/23] resctrl: Fix ownership of resource_schemata control subdirectories Fenghua Yu
2026-07-16 21:02 ` [PATCH 02/23] arm_mpam: Fix NULL address access issue Fenghua Yu
2026-07-16 21:02 ` [PATCH 03/23] resctrl: Expose MBA resource_schemata mode sysfs Fenghua Yu
2026-07-17 8:54 ` Ben Horgan
2026-07-17 10:13 ` Ben Horgan
2026-07-16 21:02 ` [PATCH 04/23] resctrl: Expose per-control status in resource_schemata Fenghua Yu
2026-07-16 21:02 ` [PATCH 05/23] resctrl: Add nested resource_schemata support for emulated controls Fenghua Yu
2026-07-16 21:02 ` [PATCH 06/23] resctrl: Mirror schemata for controls without MBW hardware Fenghua Yu
2026-07-16 21:02 ` [PATCH 07/23] resctrl: Rebuild resource_schemata subdirs on MBA mode change Fenghua Yu
2026-07-16 21:02 ` [PATCH 08/23] Documentation: resctrl: document MBA control emulation Fenghua Yu
2026-07-16 21:02 ` [PATCH 09/23] resctrl: De-hardcode L3 monitor infrastructure Fenghua Yu
2026-07-16 21:03 ` [PATCH 10/23] resctrl: Expose MBA MBM counter assignment sysfs Fenghua Yu
2026-07-16 21:03 ` [PATCH 11/23] resctrl: name node-scoped monitor domains mon_NODE_<id> Fenghua Yu
2026-07-16 21:03 ` [PATCH 12/23] resctrl: Add node-scope MBM total event Fenghua Yu
2026-07-16 21:03 ` [PATCH 13/23] resctrl: Make MBM paths resource-aware Fenghua Yu
2026-07-16 21:03 ` [PATCH 14/23] arm_mpam: Support memory-level MSCs and ABMC per class Fenghua Yu
2026-07-16 21:03 ` [PATCH 15/23] arm_mpam: Refine L3 topology and class selection Fenghua Yu
2026-07-17 9:18 ` Ben Horgan
2026-07-16 21:03 ` [PATCH 16/23] arm_mpam: Include all MSC components during domain setup Fenghua Yu
2026-07-16 21:03 ` [PATCH 17/23] arm_mpam: Handle CPU-less numa nodes Fenghua Yu
2026-07-16 21:03 ` [PATCH 18/23] arm_mpam: Emulate MB control with node-scoped MB_NODE control Fenghua Yu
2026-07-16 21:03 ` Fenghua Yu [this message]
2026-07-16 21:03 ` [PATCH 20/23] Documentation: resctrl: document NODE-scoped MBA domains and mon_NODE monitoring Fenghua Yu
2026-07-16 21:03 ` [PATCH 21/23] Documentation: resctrl: document MB_NODE emulation example on ARM MPAM Fenghua Yu
2026-07-16 21:03 ` [PATCH 22/23] arm_mpam: Add KUnit test for CPU-less NUMA node affinity Fenghua Yu
2026-07-16 21:03 ` [PATCH 23/23] selftests/resctrl: Add MB emulation test for ARM MPAM Fenghua Yu
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=20260716210329.2914625-19-fenghuay@nvidia.com \
--to=fenghuay@nvidia.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=fustini@kernel.org \
--cc=gshan@redhat.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=newtonl@nvidia.com \
--cc=reinette.chatre@intel.com \
--cc=sdonthineni@nvidia.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=tony.luck@intel.com \
--cc=vsethi@nvidia.com \
--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