[RFC PATCH v3 19/19] Documentation: arm64: mpam: Describe the L2 monitor events

From: Jinjie Ruan

Date: Mon Nov 16 2026 - 08:01:04 EST


Resctrl can now monitor at the L2 scope, so MPAM exposes the CSU and
MBWU counters of an L2 group as l2c_occupancy and mbm_core_bytes.

Also update the resctrl documentation.

Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
---
Documentation/arch/arm64/mpam.rst | 25 ++++++++++++++++---------
Documentation/filesystems/resctrl.rst | 11 +++++++++++
2 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/Documentation/arch/arm64/mpam.rst b/Documentation/arch/arm64/mpam.rst
index e445f4078ee1..f0d24fdc7677 100644
--- a/Documentation/arch/arm64/mpam.rst
+++ b/Documentation/arch/arm64/mpam.rst
@@ -32,8 +32,9 @@ Because the user interface to MPAM is via resctrl, only MPAM features that are
compatible with resctrl can be exposed to user-space.

MSC are considered as a group based on the topology. MSC that correspond with
-the L3 cache are considered together, it is not possible to mix MSC between L2
-and L3 to 'cover' a resctrl schema.
+the L3 cache are considered together, as are MSC that correspond with the L2
+cache; it is not possible to mix MSC between L2 and L3 to 'cover' a resctrl
+schema.

The supported features are:

@@ -61,9 +62,11 @@ The supported features are:
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.

-* 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.
+* Cache Storage Usage (CSU) counters expose the occupancy of the cache they
+ monitor: 'llc_occupancy' for the L3 group and 'l2c_occupancy' for the L2
+ group, provided there is at least one CSU monitor on each MSC that makes up
+ the 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
@@ -82,10 +85,14 @@ The supported features are:
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 the L2 cache. An MBWU monitor in an L2 MSC
+ counts the bytes the cache sees, which resctrl exposes as the
+ 'mbm_core_bytes' event on the L2 resource. The MSC is used for the L2 group
+ in the same way as for the L3 group above.
+
+These restrictions are due to resctrl only supporting monitoring at the L2
+and L3 cache scopes. MBWU monitors on caches at other levels, or on devices,
+are not exposed.

Command line parameters
=======================
diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
index 2750f2eabf70..506ba55793b4 100644
--- a/Documentation/filesystems/resctrl.rst
+++ b/Documentation/filesystems/resctrl.rst
@@ -510,6 +510,17 @@ with the following files:
bytes) at which a previously used LLC_occupancy
counter can be considered for reuse.

+If monitoring is available at other cache levels there will be a
+"<LEVEL>_MON" directory for each of them. For example an L2 cache exposes
+"l2c_occupancy" and "mbm_core_bytes" in "L2_MON". These directories have the
+same "num_rmids", "mon_features", "mbm_assign_mode" and
+"max_threshold_occupancy" files as "L3_MON", and when the resource supports
+assignable counters, also "num_mbm_cntrs", "available_mbm_cntrs",
+"mbm_assign_on_mkdir" and "event_configs".
+
+The "mbm_L3_assignments" file in the resource group directories is specific
+to the L3 scope.
+
If telemetry monitoring is available there will be a "PERF_PKG_MON" directory
with the following files:

--
2.34.1