[PATCH v4 27/41] arm_mpam: resctrl: Add support for csu counters

Jonathan Cameron jonathan.cameron at huawei.com
Thu Feb 5 08:55:05 PST 2026


On Tue, 3 Feb 2026 21:43:28 +0000
Ben Horgan <ben.horgan at arm.com> wrote:

> From: James Morse <james.morse at arm.com>
> 
> resctrl exposes a counter via a file named llc_occupancy. This isn't really
> a counter as its value goes up and down, this is a snapshot of the cache
> storage usage monitor.
> 
> Add some picking code which will only find an L3. The resctrl counter
> file is called llc_occupancy but we don't check it is the last one as
> it is already identified as L3.
> 
> Signed-off-by: James Morse <james.morse at arm.com>
> Co-developed-by: Dave Martin <dave.martin at arm.com>
> Signed-off-by: Dave Martin <dave.martin at arm.com>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> ---
> Changes since rfc:
> Allow csu counters however many partid or pmg there are
> else if -> if
> reduce scope of local variables
> drop has_csu
> 
> Changes since v2:
> return -> break so works for mbwu in later patch
> add for_each_mpam_resctrl_mon
> return error from mpam_resctrl_monitor_init(). It may fail when is abmc
> allocation introduced in a later patch.
> Squashed in patch from Dave Martin:
> https://lore.kernel.org/lkml/20250820131621.54983-1-Dave.Martin@arm.com/
> 
> Changes since v3:
> resctrl_enable_mon_event() signature update
> Restrict the events considered
> num-rmid update
> Use raw_smp_processor_id()
> Tighten heuristics:
>  Make sure it is the L3
>  Please shout if this means the counters aren't exposed on any platforms
I'm guessing that you mean on platforms where they were under previous version
of the heuristic?  I'll leave zhengheng to comment on that for our platforms.

> Drop tags due to change in policy/rework
> 
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
Doesn't really matter as it's the bit after --- , but what's a SoB doing here?

Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>



More information about the linux-arm-kernel mailing list