[PATCH v2 33/45] arm_mpam: resctrl: Allow resctrl to allocate monitors
Jonathan Cameron
jonathan.cameron at huawei.com
Tue Jan 6 06:37:52 PST 2026
On Fri, 19 Dec 2025 18:11:35 +0000
Ben Horgan <ben.horgan at arm.com> wrote:
> From: James Morse <james.morse at arm.com>
>
> When resctrl wants to read a domain's 'QOS_L3_OCCUP', it needs to allocate
> a monitor on the corresponding resource. Monitors are allocated by class
> instead of component.
>
> MBM monitors are much more complicated, if there are enough monitors, they
> will be pre-allocated and free-running. If ABMC is in use instead then
> 'some' are pre-allocated in a different way, and need assigning.
>
> Add helpers to allocate a CSU monitor. These helper return an out of range
> value for MBM counters.
>
> Allocating a montitor context is expected to block until hardware resources
monitor
> become available. This only makes sense for QOS_L3_OCCUP as unallocated MBM
> counters are losing data.
>
> Signed-off-by: James Morse <james.morse at arm.com>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> ---
> Changes since rfc:
> USE_RMID_IDX -> USE_PRE_ALLOCATED in comment
> Remove unnecessary arch_mon_ctx = NULL
As with some other patches, I'm not taking the time at this point to dig
into all the interactions with resctl as others will cover that much better
than me.
Too much to get done :(
With that in mind.
Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>
J
More information about the linux-arm-kernel
mailing list