[PATCH 27/33] arm_mpam: Track bandwidth counter state for power management
Jonathan Cameron
jonathan.cameron at huawei.com
Mon Nov 10 09:31:36 PST 2025
On Fri, 7 Nov 2025 12:34:44 +0000
Ben Horgan <ben.horgan at arm.com> wrote:
> From: James Morse <james.morse at arm.com>
>
> Bandwidth counters need to run continuously to correctly reflect the
> bandwidth.
>
> Save the counter state when the hardware is reset due to CPU hotplug.
> Add struct mbwu_state to track the bandwidth counter. Support for
> tracking overflow with the same structure will be added in a
> subsequent commit.
>
> Cc: Zeng Heng <zengheng4 at huawei.com>
> Signed-off-by: James Morse <james.morse at arm.com>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
One trivial below.
Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>
>
> diff --git a/drivers/resctrl/mpam_internal.h b/drivers/resctrl/mpam_internal.h
> index d8f8e29987e0..1f2b04b7703e 100644
> --- a/drivers/resctrl/mpam_internal.h
> +++ b/drivers/resctrl/mpam_internal.h
> @@ -91,7 +91,10 @@ struct mpam_msc {
> */
> struct mutex part_sel_lock;
>
> - /* cfg_lock protects the msc configuration. */
> + /*
> + * cfg_lock protects the msc configuration and guards against mbwu_state
> + * and save and restore racing.
Stray "and" that isn't needed on this second line.
> + */
> struct mutex cfg_lock;
>
More information about the linux-arm-kernel
mailing list