[PATCH 31/33] arm_mpam: Add helper to reset saved mbwu state

Gavin Shan gshan at redhat.com
Sun Nov 9 15:18:14 PST 2025


On 11/7/25 10:34 PM, Ben Horgan wrote:
> From: James Morse <james.morse at arm.com>
> 
> resctrl expects to reset the bandwidth counters when the filesystem
> is mounted.
> 
> To allow this, add a helper that clears the saved mbwu state. Instead
> of cross calling to each CPU that can access the component MSC to
> write to the counter, set a flag that causes it to be zero'd on the
> the next read. This is easily done by forcing a configuration update.
> 
> Signed-off-by: James Morse <james.morse at arm.com>
> Reviewed-by: Fenghua Yu <fenghuay at nvdia.com>
> Tested-by: Fenghua Yu <fenghuay at nvidia.com>
> Cc: Peter Newman <peternewman at google.com>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> ---
> Changes since v3:
> Correct type checking, use mpam_feat_msmon_mbwu_<n>counter
> ---
>   drivers/resctrl/mpam_devices.c  | 48 ++++++++++++++++++++++++++++++++-
>   drivers/resctrl/mpam_internal.h |  2 ++
>   2 files changed, 49 insertions(+), 1 deletion(-)
> 
Reviewed-by: Gavin Shan <gshan at redhat.com>




More information about the linux-arm-kernel mailing list