Re: [PATCH v3 30/47] arm_mpam: resctrl: Pre-allocate free running monitors

Jonathan Cameron
2026-01-13T15:10:30Z

On Mon, 12 Jan 2026 16:58:57 +0000
Ben Horgan <ben.horgan@arm.com> wrote:

> From: James Morse <james.morse@arm.com>
>
> When there are enough monitors, the resctrl mbm local and total files can
> be exposed. These need all the monitors that resctrl may use to be
> allocated up front.
>
> Add helpers to do this.
>
> If a different candidate class is discovered, the old array should be
> free'd and the allocated monitors returned to the driver.
>
> Signed-off-by: James Morse <james.morse@arm.com>
> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>