Re: [PATCH v20 04/18] x86/resctrl: Split the rdt_domain and rdt_hw_domain structures

Reinette Chatre
2024-06-20T21:14:55Z

Hi Tony,

On 6/10/24 11:35 AM, Tony Luck wrote:
> The same rdt_domain structure is used for both control and monitor
> functions. But this results in wasted memory as some of the fields are
> only used by control functions, while most are only used for monitor
> functions.

To me the "wasted memory" motivation is secondary to the potential
confusion caused by validity of struct members being dependent on which
list the struct belongs to. Could be obvious if all operations are on the list
but once a list entry is passed through a few layers it becomes harder
to decipher.

>
> Split into separate rdt_ctrl_domain and rdt_mon_domain structures with
> just the fields required for control and monitoring respectively.
>
> Similar split of the rdt_hw_domain structure into rdt_hw_ctrl_domain
> and rdt_hw_mon_domain.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---

Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>

Reinette