[PATCH 4/5] fs/resctrl: Drop unnecessary is_mba_linear() helper
From: Reinette Chatre
Date: Thu Sep 03 2026 - 13:23:27 EST
is_mba_linear() assumes it operates on the MBA resource and returns whether
the resource is linear. There is only one caller that separately makes the
same assumption.
Avoid duplicating the resource assumptions and let the only caller access
the needed property directly.
Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
---
Changes from RFC v1:
- RFC v1 made bandwidth delay a resource property. That change was dropped
and this cleanup is all that remained.
---
fs/resctrl/rdtgroup.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
index 68be9b903ac6..821c6e2b10f4 100644
--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -2577,11 +2577,6 @@ mongroup_create_dir(struct kernfs_node *parent_kn, struct rdtgroup *prgrp,
return ret;
}
-static inline bool is_mba_linear(void)
-{
- return resctrl_arch_get_resource(RDT_RESOURCE_MBA)->membw.delay_linear;
-}
-
static int mba_sc_domain_allocate(struct rdt_resource *r, struct rdt_ctrl_domain *d)
{
u32 num_closid = resctrl_arch_get_num_closid(r);
@@ -2621,7 +2616,7 @@ static bool supports_mba_mbps(void)
struct rdt_resource *r = resctrl_arch_get_resource(RDT_RESOURCE_MBA);
return (resctrl_is_mbm_enabled() &&
- r->alloc_capable && is_mba_linear() &&
+ r->alloc_capable && r->membw.delay_linear &&
r->ctrl_scope == rmbm->mon_scope &&
!rmbm->mon.mbm_cntr_assignable);
}
--
2.55.0