Re: [PATCH v2 04/16] x86/resctrl: Change generic monitor functions to use struct rdt_domain_hdr
From: Reinette Chatre
Date: Mon Mar 31 2025 - 12:17:15 EST
Hi Tony,
On 3/21/25 4:15 PM, Tony Luck wrote:
> Functions that don't need the internal details of the rdt_mon_domain
> can operate on just the rdt_domain_hdr.
This does not seem accurate. The functions are modified to take rdt_domain_hdr
as parameter but then the functions are modified to extract rdt_mon_domain
based on rdt_domain_hdr .... and proceeds to operate on internals of
rdt_mon_domain in a way that contradicts the changelog.
Considering what comes later this seems risky to me to rely on the
code flow to interpret which structure rdt_domain_hdr forms part of. I think
that it will be safer if rdt_domain_hdr gets an identifier that reflects which
structure it forms part of so that the accessors could be made explicit and
have error checking.
Reinette