Re: [PATCH v7 05/31] x86,fs/resctrl: Improve domain type checking
From: Reinette Chatre
Date: Fri Jul 25 2025 - 19:18:57 EST
Hi Tony,
On 7/11/25 4:53 PM, Tony Luck wrote:
> The rdt_domain_hdr structure is used in both control and monitor
> domain structures to provide common methods for operations such as
> adding a CPU to a domain, removing a CPU from a domain, accessing
> the mask of all CPUs in a domain.
>
> The "type" field provides a simple check whether a domain is a
> control or monitor domain so that programming errors operating
> on domains will be quickly caught.
Above is context.
Below is a mixup of problem and solution. Please separate these clearly.
> To prepare for additional domain types that depend on the rdt_resource
If "rdt_resource" refers to the struct then please "struct rdt_resource".
If it instead just refers to the concept of a resource, just "resource".
> to which they are connected add the resource id into the header
> and check that in addition to the type.
>
> Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
> ---
Reinette