Re: [PATCH v14 08/32] x86,fs/resctrl: Rename struct rdt_mon_domain and rdt_hw_mon_domain

Reinette Chatre
2025-12-02T16:07:57Z

Hi Tony,

On 11/24/25 10:53 AM, Tony Luck wrote:
> The upcoming telemetry event monitoring is not tied to the L3 resource and
> will have new domain structures.

"new domain structures" -> "a new domain structure"?
Looking back I made the wrong suggestion in v13. Since it was just taken verbatim do
you find it accurate to say there are multiple domain structures associated with
telemetry monitoring? This series only introduces struct rdt_perf_pkg_mon_domain though.

>
> Rename the L3 resource specific domain data structures to include "l3_"
> in their names to avoid confusion between the different resource specific
> domain structures:
> rdt_mon_domain -> rdt_l3_mon_domain
> rdt_hw_mon_domain -> rdt_hw_l3_mon_domain
>
> No functional change.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
...

> diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
> index 4a916c84a322..d6da21d4684b 100644
> --- a/arch/x86/kernel/cpu/resctrl/internal.h
> +++ b/arch/x86/kernel/cpu/resctrl/internal.h
> @@ -50,8 +50,8 @@ struct arch_mbm_state {
> #define SDCIAE_ENABLE_BIT 1
>
> /**
> - * struct rdt_hw_ctrl_domain - Arch private attributes of a set of CPUs that share
> - * a resource for a control function
> + * struct rdt_hw_ctrl_domain - Arch private attributes of a set of CPUs sharing
> + * RDT_RESOURCE_L3 monitoring

This patch is not expected to touch struct rdt_hw_ctrl_domain. Referring to it
as involved with monitoring is also wrong ...

> * @d_resctrl: Properties exposed to the resctrl file system
> * @ctrl_val: array of cache or mem ctrl values (indexed by CLOSID)
> *
> @@ -63,17 +63,17 @@ struct rdt_hw_ctrl_domain {
> };
>
> /**
> - * struct rdt_hw_mon_domain - Arch private attributes of a set of CPUs that share
> - * a resource for a monitor function
> - * @d_resctrl: Properties exposed to the resctrl file system
> + * struct rdt_hw_l3_mon_domain - Arch private attributes of a set of CPUs that share
> + * a resource for a monitor function

... was that struct rdt_hw_ctrl_domain change intended to be here?

> + * @d_resctrl: Properties exposed to the resctrl file system
> * @arch_mbm_states: Per-event pointer to the MBM event's saved state.
> * An MBM event's state is an array of struct arch_mbm_state
> * indexed by RMID on x86.
> *
> * Members of this structure are accessed via helpers that provide abstraction.
> */
> -struct rdt_hw_mon_domain {
> - struct rdt_mon_domain d_resctrl;
> +struct rdt_hw_l3_mon_domain {
> + struct rdt_l3_mon_domain d_resctrl;
> struct arch_mbm_state *arch_mbm_states[QOS_NUM_L3_MBM_EVENTS];
> };
>

Reinette