mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] arm_mpam: Add L2 cache monitors
@ 2026-10-22  8:48 Jinjie Ruan
  2026-10-22  8:48 ` [RFC PATCH 1/7] fs/resctrl: Generalize __l3_mon_event_count for non-L3 resources Jinjie Ruan
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Jinjie Ruan @ 2026-10-22  8:48 UTC (permalink / raw)
  To: catalin.marinas, will, mark.rutland, corbet, skhan, rdunlap,
	james.morse, ben.horgan, reinette.chatre, fenghuay, tony.luck,
	Dave.Martin, babu.moger, x86, linux-arm-kernel, linux-doc,
	linux-kernel
  Cc: ruanjinjie

MPAM resource monitors hang off a partitionable resource in an MSC, not
off a particular cache level. resctrl only knows about the L3 scope, so
the L2 cache monitors that MPAM platforms implement are discovered by
the driver but never show up in resctrl.

An L2 MSC has the same CSU and MBWU counters as an L3 MSC; the cache
level comes from the ACPI MPAM table's cache locator. So this is mostly
a resctrl scope problem, not a hardware one.

Extend resctrl's monitor scope to L2: register the L2 occupancy and
bandwidth events against the L2 resource, pick the L2 classes for them,
and borrow a CSU/MBWU monitor for the duration of a read. With CDP the
two PARTIDs need separate accumulating monitors, so the borrowed-monitor
context becomes one monitor per PARTID.

Patches:

  1-2  Generalise the per-domain read path, add l2c_occupancy and
       mbm_core_bytes, update the documentation.

  3    Split the borrowed-monitor context into data and code entries.

  4    Do the CDP num_rmid halving for every mon_capable resource.

  5-7  Pick the L2 classes, describe the events with the L2 resource,
       add the read paths.

Tested on QEMU with an L2/L3/memory-controller MSC topology. The L2_MON
files show up and are readable; l2c_occupancy reports the modelled
occupancy, and mbm_core_bytes reports the modelled bandwidth.

QEMU branch: https://github.com/ruanjinjie-eng/qemu/tree/mpam
Test cases: https://github.com/ruanjinjie-eng/mpam_testcase

Jinjie Ruan (7):
  fs/resctrl: Generalize __l3_mon_event_count for non-L3 resources
  fs/resctrl: Add the L2 monitor events
  arm_mpam: resctrl: Split monitor context for code/data
  arm_mpam: resctrl: Halve num_rmid for every mon_capable resource on
    CDP
  arm_mpam: resctrl: Describe the L2 monitor events with the L2 resource
  arm_mpam: resctrl: Pick L2 classes for the L2 monitor events
  arm_mpam: resctrl: Add the L2 monitor read paths

 Documentation/arch/arm64/mpam.rst |  23 +--
 drivers/resctrl/mpam_resctrl.c    | 236 +++++++++++++++++++++++-------
 fs/resctrl/monitor.c              |  15 +-
 include/linux/resctrl_types.h     |  13 +-
 4 files changed, 222 insertions(+), 65 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-10-26 11:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22  8:48 [RFC PATCH 0/7] arm_mpam: Add L2 cache monitors Jinjie Ruan
2026-10-22  8:48 ` [RFC PATCH 1/7] fs/resctrl: Generalize __l3_mon_event_count for non-L3 resources Jinjie Ruan
2026-10-22  8:48 ` [RFC PATCH 2/7] fs/resctrl: Add the L2 monitor events Jinjie Ruan
2026-10-26 11:50   ` Ben Horgan
2026-10-22  8:48 ` [RFC PATCH 3/7] arm_mpam: resctrl: Split monitor context for code/data Jinjie Ruan
2026-10-22  8:48 ` [RFC PATCH 4/7] arm_mpam: resctrl: Halve num_rmid for every mon_capable resource on CDP Jinjie Ruan
2026-10-22  8:48 ` [RFC PATCH 5/7] arm_mpam: resctrl: Describe the L2 monitor events with the L2 resource Jinjie Ruan
2026-10-22  8:48 ` [RFC PATCH 6/7] arm_mpam: resctrl: Pick L2 classes for the L2 monitor events Jinjie Ruan
2026-10-22  8:48 ` [RFC PATCH 7/7] arm_mpam: resctrl: Add the L2 monitor read paths Jinjie Ruan
2026-10-26 11:46 ` [RFC PATCH 0/7] arm_mpam: Add L2 cache monitors Ben Horgan

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®