[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e0cdccc-ed1e-4bcb-8bd7-b0274609928c@intel.com>
Date: Wed, 13 Aug 2025 20:57:18 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghuay@...dia.com>, "Maciej
Wieczor-Retman" <maciej.wieczor-retman@...el.com>, Peter Newman
<peternewman@...gle.com>, James Morse <james.morse@....com>, Babu Moger
<babu.moger@....com>, Drew Fustini <dfustini@...libre.com>, Dave Martin
<Dave.Martin@....com>, Anil Keshavamurthy <anil.s.keshavamurthy@...el.com>,
Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v8 05/32] x86,fs/resctrl: Improve domain type checking
Hi Tony,
On 8/11/25 11:16 AM, 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
"The "type" field provides" -> "rdt_domain_hdr::type provides"
> control or monitor domain so that programming errors operating
> on domains will be quickly caught. This is insufficient to
> catch errors when other resources besides L3 support monitor
> events.
>
> Add a new rdt_domain_hdr::rid field that is initialized when domain
> structures are allocated. Call domain_header_is_valid() to sanity
Needs imperative. For example (please feel free to improve ... this
and any other suggestion I may have):
"Add rdt_domain_hdr::rid to contain the resource id and initialize it
as part of domain structure allocation done by CPU online handler. Call ..."
> check both the type and resource id before using container_of()
> to get a pointer to the associated domain.
>
(sidenote: The last sentence above is very important since it
establishes a requirement that domain_header_is_valid() should always
be used before container_of(). This does not seem to be consistently
followed by this series. I will point out the ones I noticed, please
double check the final result to confirm that this pattern is
consistently used as intended.)
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
| Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
Reinette
Powered by blists - more mailing lists