Re: [RFC PATCH 6/8] arm,x86,fs/resctrl: Prepare for asymmetric caches

From: Chen Yu

Date: Tue Nov 03 2026 - 10:50:35 EST


On Mon, Oct 26, 2026 at 02:57:16PM -0700, Tony Luck wrote:
> Each struct resctrl_ctrl carries a struct resctrl_ctrl_bitmap that describes
> properties (cbm_len, min_cbm_bits, shareable_bits, flags) shared by every
> control domain using that control. This assumes all domains of a control are
> symmetric. Future asymmetric systems may have control domains with differing
> bitmap properties, in particular a @cbm_len that varies by cache instance.
>
> Add a field to the rdt_ctrl_domain structure to store per-domain cache
> bitmap lengths.
>
> Update code that reads cbm_len to use the per-domain copy instead of the
> resctrl_ctrl copy, so that domain-specific values will be picked up when
> asymmetric domains are enumerated.
>
> +static void rdt_sync_ctrl_bitmap(struct rdt_resource *r, struct rdt_ctrl_domain *d)
> +{
> + struct resctrl_ctrl *ctrl;
> +
> + for_each_resource_ctrl(ctrl, r) {

maybe we can let rdt_sync_ctrl_bitmap() receives the resctrl_ctrl from
domain_add_cpu_ctrl() then we don't need to iterate the controllers under
resource?

rdt_sync_ctrl_bitmap(r, d, ctrl);

thanks,
Chenyu
> + if (ctrl->type != RESCTRL_CTRL_BITMAP)
> + continue;
> + d->cbm_len = ctrl->bitmap.cbm_len;
> + break;
> + }
> +}