Re: [PATCH v9 05/12] x86/resctrl: Attach ACPI ERDT information to L3 mon domain on CPU online

From: Chen Yu

Date: Tue Oct 27 2026 - 23:12:14 EST


Hi Reinette,

On Tue, Oct 27, 2026 at 09:17:18AM -0700, Reinette Chatre wrote:
> Hi Chenyu,
>

[ ... ]

> >
> > OK, how about changing it to:
> >
> > * Return: true if @cpu can be added to resctrl domains, false if @cpu must
> > * not be in any resctrl domain.
>
> This refers to how caller acts on result of this function as opposed to what
> this function actually returns. Compare to, for example:
>
> * Return: true if ERDT is unused, or if the ERDT domain containing @cpu is
> * bound to @cpu's L3 cache ID, whether that binding already existed or was
> * created by this call. false if ERDT and CPUID cannot be reconciled into a
> * one-to-one binding, in which case no binding is modified.
>

OK, got it, will change it in next version.

[ ... ]

> >> Could this add a note (if it is actually true) that earlier checks ensures
> >> that hw_dom->d_info will *always* point to a valid ERDT domain ... or does
> >> resctrl need to check for hw_dom->d_info everywhere like erdt_mon_read()?
> >> Or are those checks just for robustness?
> >>
> >
> > It should be always valid if ERDT is enabled. The CPU that creates the L3
> > monitoring domain has passed erdt_try_bind_domain(), which bound an ERDT
> > domain to that CPU's L3 cache ID. The L3 monitoring domain ID is the L3
> > cache ID, so the lookup should always find a match.
>
> Could you please add a this information to the function comment?
>

OK, will do.

thanks,
Chenyu