Re: [PATCH 27/33] arm_mpam: Track bandwidth counter state for power management

From: Gavin Shan

Date: Sun Nov 09 2025 - 18:16:23 EST


On 11/7/25 10:34 PM, Ben Horgan wrote:
From: James Morse <james.morse@xxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: James Morse <james.morse@xxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
Changes since v3:
Drop tags
Fix correction accounting
Split out overflow checking
---
drivers/resctrl/mpam_devices.c | 126 +++++++++++++++++++++++++++++++-
drivers/resctrl/mpam_internal.h | 21 +++++-
2 files changed, 145 insertions(+), 2 deletions(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>