Re: [PATCH v4 1/6] x86/resctrl: Parse ACPI ERDT table and map RMDD domains by L3 cache ID
From: Reinette Chatre
Date: Thu Jun 25 2026 - 11:56:55 EST
Hi Chenyu,
On 6/25/26 7:33 AM, Chen, Yu C wrote:
> On 6/25/2026 7:44 AM, Reinette Chatre wrote:
>> On 6/23/26 9:05 PM, Chen, Yu C wrote:
...
>> Considering that this now establishes 1:1 between RMDD and resctrl domain and that
>> resctrl already maintains a list of domains, could the x86 arch specific monitoring
>> domain (struct rdt_hw_l3_mon_domain) perhaps just point to the ERDT monitoring data
>> for that domain instead of maintaining a separate array of domains? So, when x86 is
>> requested to read monitoring data for a domain there would be no need to query an
>> array for the ERDT domain info since the containing structure already has a pointer
>> to it.
>>
>> This may need more care to organize the ERDT per-domain monitoring data structure when
>> considering the references to upcoming additions that are not clear to me at this time.
>>
>
> I see. We could add a void *priv pointer to struct rdt_hw_l3_mon_domain.
This is architecture specific code and I do not see a need to hide what the data
represents behind a void pointer. struct rdt_hw_l3_mon_domain could have pointer of
accurate type. For reference you can compare with struct rdt_hw_resource and all its
AMD architecture specific members.
> During l3_mon_domain_setup(), we can assign this pointer to the corresponding
> erdt_domain_info object from the previously created list.
> Since each rdt_hw_l3_mon_domain instance is freed when the last CPU in its domain
> goes offline, we need to keep the global list of struct erdt_domain_info objects
Sounds good.
> persistent at all times. Going forward, we may also need to add the same pointer
> assignment to rdt_hw_ctrl_domain for the upcoming region-aware MBA changes.
>
>>>
>>> 3. erdt_mon_read() looks up erdt_domain_xa by hdr->id (L3 cache ID) as before,
>>> but the xarray is now populated lazily at CPU online time.
>>
>> I do not see the need for an xarray. As new domains are created during CPU online their
>> initialization can just point to the needed data, no?
>>
>
> If we add the struct erdt_domain_info pointer to rdt_hw_l3_mon_domain, then
> there is no need to maintain the xarray.
ack. Thank you.
Reinette