Re: [RFC PATCH v2 10/10] arm_mpam: resctrl: Update the comment on monitoring domain setup

From: Reinette Chatre

Date: Tue Nov 03 2026 - 19:51:29 EST


Hi Ben,

On 11/3/26 8:27 AM, Ben Horgan wrote:
> On 19/10/2026 23:07, Reinette Chatre wrote:
>> The comment in mpam_resctrl_setup_mon_domain() explains that the L3
>> component IDs need to be used for a monitoring domain because there may
>> be no control component for the L3. It also describes searching each
>> event's class for a component with overlapping CPUs.
>>
>> Neither matches the code. The monitoring domain has its own structure
>> and is set up independently of the control domain, so whether a control
>> component exists has no bearing on it. Each event's class must have a
>> component that contains the CPU, and all components of the domain must
>> cover the same CPUs, which is stricter than overlapping.
>>
>> Rewrite the comment to say where the domain's ID comes from and what is
>> required of the components that back the domain's events.
>>
>> No functional change.
>>
>> Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
>> ---
>> Note to maintainers: This comment update is kept as a separate patch to
>> make it easy to review. It can be folded into "arm_mpam: resctrl: Give
>> the monitoring domain its own structure" and "arm_mpam: resctrl: Require
>> monitoring components to cover the same CPUs" if preferred.
>
> Yes, I think squashing those 3 patches together would be good.
>
Done. Since "arm_mpam: resctrl: Require monitoring components to cover the same CPUs"
depends on "arm_mpam: resctrl: Require a component for each monitoring event" for
which you provided RB separately I re-ordered "arm_mpam: resctrl: Require a component
for each monitoring event" to be before "arm_mpam: resctrl: Give the monitoring domain
its own structure" to support this squash.

At this point the next version of this series looks like:
arm_mpam: resctrl: Add a helper to find the component counting an event
arm_mpam: resctrl: Use find_component() when allocating a domain
arm_mpam: resctrl: Rename ctrl_comp in mpam_resctrl_alloc_domain()
arm_mpam: resctrl: Do not fail CPU online when domain setup fails
arm_mpam: resctrl: Split control and monitoring domain setup into helpers
arm_mpam: resctrl: Require a component for each monitoring event
arm_mpam: resctrl: Give the monitoring domain its own structure
arm_mpam: resctrl: Rename struct mpam_resctrl_dom to mpam_resctrl_ctrl_dom

Thank you very much for your review. Unless something shows up I plan to send the
next version next week.

Reinette