Re: [PATCH v2 25/45] arm_mpam: resctrl: Add support for 'MB' resource
From: Ben Horgan <ben.horgan@arm.com>
Date: 2026-01-12 16:45:58
Also in:
kvmarm, lkml
Hi Shaopeng, On 1/8/26 10:42, Shaopeng Tan (Fujitsu) wrote:
Hello Ben,quoted
From: James Morse <james.morse@arm.com> resctrl supports 'MB', as a percentage throttling of traffic somewhere after the L3. This is the control that mba_sc uses, so ideally the class chosen should be as close as possible to the counters used for mba_local. MB's percentage control should be backed either with the fixed point fraction MBW_MAX. The bandwidth portion bitmaps is not used as its tricky to pick which bits to use to avoid contention, and may be possible to expose this as something other than a percentage in the future. CC: Zeng Heng <redacted> Co-developed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: James Morse <james.morse@arm.com>> Signed-off-by: Ben Horgan <ben.horgan@arm.com> --- drivers/resctrl/mpam_resctrl.c | 212 ++++++++++++++++++++++++++++++++- 1 file changed, 211 insertions(+), 1 deletion(-)
[...]
quoted
static int mpam_resctrl_control_init(struct mpam_resctrl_res *res, enum resctrl_res_level type) { struct mpam_class *class = res->class; + struct mpam_props *cprops = &class->props; struct rdt_resource *r = &res->resctrl_res; switch (r->rid) {@@ -361,6 +531,20 @@ static int mpam_resctrl_control_init(struct mpam_resctrl_res *res, * 'all the bits' is the correct answer here. */ r->cache.shareable_bits = resctrl_get_default_ctrl(r); + break; + case RDT_RESOURCE_MBA: + r->alloc_capable = true; + r->schema_fmt = RESCTRL_SCHEMA_RANGE; + r->ctrl_scope = RESCTRL_L3_CACHE;Could you please elaborate why RESCTRL_L3_CACHE is required here?
The location of the mba control in resctrl is named using the id of the l3 cache and so needs to associated with it. James is working on some documentation that will mention this along with other things.
Best regards, Shaopeng TAN
Thanks, Ben