Thread (2 messages) 2 messages, 2 authors, 2025-12-03

Re: [PATCH v6 00/34] arm_mpam: Add basic mpam driver

From: James Morse <james.morse@arm.com>
Date: 2025-12-03 17:34:49
Also in: linux-acpi, lkml

Hi Punit,

On 03/12/2025 11:21, Punit Agrawal wrote:
Ben Horgan [off-list ref] writes:
quoted
On 11/24/25 15:21, Punit Agrawal wrote:
quoted
Although a little late to the party,
There was a party?!

quoted
quoted
I've managed to throw together
enough firmware to describe the MPAM hardware and take this set (more
specifically mpam/snapshot/v6.18-rc4-v5 branch from James' repository)
for a spin. Using the branch, the kernel is able to probe the hardware
and discover the advertised features. Yay! We are in business.
Thanks for giving it a go. :)
quoted
Having said that, there are a few quirks of the platform that run into
issues with later patches in the branch.
So something in the resctrl support code is causing this.
Any idea which patch causes this to happen?

There are a load of pr_debug() in the picking logic, if you enable DYNDEBUG and add:
| dyndbg="file mpam_resctrl.c +pl"

to the commandline, you should get some snotty messages about what non-Xeon-like property
your platform has.


quoted
quoted
The platform has MSCs attached
to shared L2 caches which are being skipped during later stages of
initialisation. IIUC, the L2 MSCs' limitations stems from the
assumptions in the resctrl interface.
What in particualar is being skipped?
The registration of the discovered MSCs with resctrl and subsequent
exposing it to the user.
resctrl's 'L2' support is limited to the CPOR bitmap.
If you have controls, there is no resctrl 'event' that can exposed them.
(the problem being they all have 'L3' in the name!)

quoted
quoted
I was wondering if there are any patches available to relax these
limitations?
Knowing which property it is will help - but some of these things are checked
to match resctrl's ABI. They can't necessarily be relaxed without breaking
user-space.

Others are sanity checks, e.g. all CPUs are represented. This is to avoid tasks
that run on cpu-9 escaping the resctrl controls. Platforms that did this may as
well not bother with resctrl at all.

quoted
quoted
I can give them a try. Or do these need to be put together
from the ground up? Any pointers greatly appreciated.
There are some extra things added in the extras branch [1] e.g. cache
maximum usage controls (cmax). However, lots of possible things are
still missing e.g. any monitors on L2. If it doesn't fit with the
topology expected by resctrl then it is unlikely to have been considered
yet.
Thanks for the pointer. I'll give the snapshot+extras branch[1] a try.

The platform does have both controls and monitors attached to L2. If
this isn't being looked at, I can try and put something together. Thanks
for confirming that the limitation is likely due to resctrl.
My view on 'extra' counters is to try and expose them via perf, as this would also
allow platform specific counters. I worry that if we start adding 'easy' ones like
l2_mbm_total to resctrl, someone will want left_hand_side_of_soc_mbm_total.


Thanks,

James
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help