[PATCH v1 3/4] fs/resctrl: Disallow the software controller when mbm counters are assignable
From: Ben Horgan
Date: Wed Feb 25 2026 - 15:21:37 EST
The software controller requires that there are free running mbm counters
for each control group in order to provide the feedback necessary to
control the memory bandwidth allocation for that control group. Previous
to the introduction counter assignment support (ABMC) resctrl required this
in order to advertise support for mbm but now if the mbm counters are
assignable then this can't be guaranteed.
Currently, only AMD systems support counter assignment but the MBA is non
linear and so the software controller is never supported anyway. For MPAM
systems the MBA is linear and so the dependency on counters not being
assignable needs to made explicit. Hence, fail the mount if the user
requests the software controller, the mba_MBps option, and the mbm counters
are assignable.
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
fs/resctrl/rdtgroup.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
index e79929d84317..10ff3a125751 100644
--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -2523,7 +2523,8 @@ static bool supports_mba_mbps(void)
return (resctrl_is_mbm_enabled() &&
r->alloc_capable && is_mba_linear() &&
- r->ctrl_scope == rmbm->mon_scope);
+ r->ctrl_scope == rmbm->mon_scope &&
+ !rmbm->mon.mbm_cntr_assignable);
}
/*
@@ -2938,7 +2939,7 @@ static int rdt_parse_param(struct fs_context *fc, struct fs_parameter *param)
ctx->enable_cdpl2 = true;
return 0;
case Opt_mba_mbps:
- msg = "mba_MBps requires MBM and linear scale MBA at L3 scope";
+ msg = "mba_MBps requires dedicated MBM counters and linear scale MBA at L3 scope";
if (!supports_mba_mbps())
return invalfc(fc, msg);
ctx->enable_mba_mbps = true;
--
2.43.0