[PATCH v4 1/3] arm_mpam: resctrl: Leave CDP off when there are too few PARTIDs
Gavin Shan
gshan at redhat.com
Thu Nov 12 15:28:34 PST 2026
On 11/11/26 6:13 PM, Jinjie Ruan wrote:
> Enabling CDP requires at least 2 PARTIDs. If there are too few PARTIDs,
> resctrl_arch_set_cdp_enabled() returns -EINVAL, but only after it has
> recorded CDP as enabled, halved the monitor count and turned off the
> mbw_max MBA control. resctrl then believes CDP is off, which leaves the
> two sides out of step and the halved monitor count and the missing MBA
> control are not undone.
>
> Check the PARTID limit before anything is changed so a failed enable has
> no effect.
>
> Fixes: 6789fb99282c ("arm_mpam: resctrl: Add CDP emulation")
> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>
> Cc: <stable at vger.kernel.org> # 7.1+
> ---
> drivers/resctrl/mpam_resctrl.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Reviewed-by: Gavin Shan <gshan at redhat.com>
More information about the linux-arm-kernel
mailing list