MPAM changes for v7.3

Ben Horgan ben.horgan at arm.com
Mon Aug 3 03:29:50 PDT 2026


Hi Will,

On 8/2/26 13:12, Will Deacon wrote:
> On Fri, 31 Jul 2026 18:52:37 +0100, Ben Horgan wrote:
>> Please find the MPAM changes for v7.3 in this collected series. I hope
>> this is more convenient than my last pull request for the fixes.
>>
>> This combines the MPAM abmc emulation series and a fix for an Nvidia quirk which:
>>
>> Make MPAM memory bandwidth counters usable by hooking them to resctrl's counter assignment
>> interface.
>>
>> [...]
> 
> Applied to arm64 (for-next/mpam), thanks!
> 
> [1/6] arm_mpam: resctrl: Pick classes for use as MBM counters
>       https://git.kernel.org/arm64/c/436d111d918a
> [2/6] arm_mpam: resctrl: Pre-allocate assignable monitors
>       https://git.kernel.org/arm64/c/779cfd653168
> [3/6] arm_mpam: resctrl: Add resctrl_arch_config_cntr() for ABMC use
>       https://git.kernel.org/arm64/c/6e0e538a75ce
> [4/6] arm_mpam: resctrl: Add resctrl_arch_cntr_read() & resctrl_arch_reset_cntr()
>       https://git.kernel.org/arm64/c/a5ff6ef2d73e
> [5/6] arm64: mpam: Add memory bandwidth usage (MBWU) documentation
>       https://git.kernel.org/arm64/c/6b4ee75215c9
> [6/6] arm_mpam: Apply T241-MPAM-6 to 63-bit counters
>       https://git.kernel.org/arm64/c/2c43aced9be3
> 
> It looks like you've been keeping an eye on the Sashiko reviews, but
> please can you double-check the open-comments on this posting?
> 
>   https://sashiko.dev/#/patchset/20260731175243.904730-1-ben.horgan%40arm.com

Sashiko reports some real existing issues that I have already got patches on the list. Other than
this there is potential for one-off leaks of the abmc counters an an existing possible deadlock in
resctrl. At least one of the leaks is worth addressing, I'll look into that. I need to check further
for the existing resctrl deadlock, there have been similar problems in this area. See below for
notes on each of the Sashiko comments.


Patch 1
https://sashiko.dev/#/patchset/20260731175243.904730-1-ben.horgan%40arm.com?part=1

Comment 1: Nope
We read the counters using resctrl_arch_cntr_read() rather than resctrl_arch_rmid_read() as we only
support mbm_event (ABMC emulation) and not the "default" free-running counters mode.

Comment 2: Yes
Separate fix is here:
https://lore.kernel.org/linux-arm-kernel/20260710115546.29644-9-ben.horgan@arm.com/

Patch 2
https://sashiko.dev/#/patchset/20260731175243.904730-1-ben.horgan%40arm.com?part=2

Comment 1: Same as Patch 1 Comment 2

Comment 2: Not really
Potentially a small leak but currently resctrl_enable_mon_event() can't fail with these arguments.

Comment 3: Yes
This is a leak on MPAM teardown which only happens if MPAM is being disabled due to an error and can
only happen once. I'll look into fixing this.


Patch 3
https://sashiko.dev/#/patchset/20260731175243.904730-1-ben.horgan%40arm.com?part=3

Comment 1: No
resctrl_arch_cntr_read() implemented in the following patch

Comment 2: Probably
One off leaks can happen on initialisation failure.

Comment 3: To check, possibly an existing potential deadlock in resctrl
Reinette fixed a similar issue relating to cpu_read_lock(). I'll look and see if there is a similar
problem with rdtgroup_mutex.
https://lore.kernel.org/lkml/3f0e0752deb3421606dfc4600f0ab3a4ae098cd7.1783963505.git.reinette.chatre@intel.com/

Patch 4:
https://sashiko.dev/#/patchset/20260731175243.904730-1-ben.horgan%40arm.com?part=4

Comment 1: Not exactly

I don't think there is a real error but it's tidied in:
https://lore.kernel.org/linux-arm-kernel/20260710115546.29644-10-ben.horgan@arm.com/

Patch 5: no comments

Patch 6:
https://sashiko.dev/#/patchset/20260731175243.904730-1-ben.horgan%40arm.com?part=6

Comment 1: Yes
An existing issue addressed by:
https://lore.kernel.org/linux-arm-kernel/20260710115546.29644-7-ben.horgan@arm.com/

Thanks,

Ben

> 
> Cheers,




More information about the linux-arm-kernel mailing list