x86/resctrl: Block use of mba_MBps mount option on Sub-NUMA Cluster (SNC) systems
When SNC is enabled there is a mismatch between the MBA control function which operates at L3 cache scope and the MBM monitor functions which measure memory bandwidth on each SNC node. Block use of the mba_MBps when scopes for MBA/MBM do not match. Improve user diagnostics by adding invalfc() message when mba_MBps is not supported. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20240628215619.76401-8-tony.luck@intel.com
This commit is contained in:
committed by
Borislav Petkov (AMD)
parent
e13db55b5a
commit
ac20aa4230
@@ -2335,14 +2335,18 @@ static void mba_sc_domain_destroy(struct rdt_resource *r,
|
||||
|
||||
/*
|
||||
* MBA software controller is supported only if
|
||||
* MBM is supported and MBA is in linear scale.
|
||||
* MBM is supported and MBA is in linear scale,
|
||||
* and the MBM monitor scope is the same as MBA
|
||||
* control scope.
|
||||
*/
|
||||
static bool supports_mba_mbps(void)
|
||||
{
|
||||
struct rdt_resource *rmbm = &rdt_resources_all[RDT_RESOURCE_L3].r_resctrl;
|
||||
struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_MBA].r_resctrl;
|
||||
|
||||
return (is_mbm_local_enabled() &&
|
||||
r->alloc_capable && is_mba_linear());
|
||||
r->alloc_capable && is_mba_linear() &&
|
||||
r->ctrl_scope == rmbm->mon_scope);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2750,6 +2754,7 @@ static int rdt_parse_param(struct fs_context *fc, struct fs_parameter *param)
|
||||
{
|
||||
struct rdt_fs_context *ctx = rdt_fc2context(fc);
|
||||
struct fs_parse_result result;
|
||||
const char *msg;
|
||||
int opt;
|
||||
|
||||
opt = fs_parse(fc, rdt_fs_parameters, param, &result);
|
||||
@@ -2764,8 +2769,9 @@ 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 local MBM and linear scale MBA at L3 scope";
|
||||
if (!supports_mba_mbps())
|
||||
return -EINVAL;
|
||||
return invalfc(fc, msg);
|
||||
ctx->enable_mba_mbps = true;
|
||||
return 0;
|
||||
case Opt_debug:
|
||||
|
||||
Reference in New Issue
Block a user