lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6f15631-81a0-4c03-a088-67543b569e96@intel.com>
Date: Tue, 8 Jul 2025 14:06:41 -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 v6 10/30] x86,fs/resctrl: Rename struct rdt_mon_domain and
 rdt_hw_mon_domain

Hi Tony,

On 6/26/25 9:49 AM, Tony Luck wrote:
> Historically all monitoring events have been associated with the L3
> resource. This will change when support for telemetry events is added.
> 
> The structures to track monitor domains at both the file system and

"The structures to track monitor domains" -> "The structures to track
monitor domains of the L3 resource"?
(goal is to connect the context that is about the resource jumping to
problem description that is about domains)

> architecture level have generic names. This may cause confusion when
> support for monitoring events in other resources is added.
> 
> Rename by adding "l3_" into the names:
> 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@...el.com>
> ---
>  include/linux/resctrl.h                | 16 ++++++------
>  arch/x86/kernel/cpu/resctrl/internal.h | 12 ++++-----
>  fs/resctrl/internal.h                  |  8 +++---
>  arch/x86/kernel/cpu/resctrl/core.c     | 14 +++++-----
>  arch/x86/kernel/cpu/resctrl/monitor.c  | 18 ++++++-------
>  fs/resctrl/ctrlmondata.c               |  2 +-
>  fs/resctrl/monitor.c                   | 34 ++++++++++++------------
>  fs/resctrl/rdtgroup.c                  | 36 +++++++++++++-------------
>  8 files changed, 70 insertions(+), 70 deletions(-)
> 
> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
> index b332466312e1..01740acebcd1 100644
> --- a/include/linux/resctrl.h
> +++ b/include/linux/resctrl.h
> @@ -166,7 +166,7 @@ struct rdt_ctrl_domain {
>  };
>  
>  /**
> - * struct rdt_mon_domain - group of CPUs sharing a resctrl monitor resource
> + * struct rdt_l3_mon_domain - group of CPUs sharing a resctrl monitor resource
>   * @hdr:		common header for different domain types
>   * @ci_id:		cache info id for this domain
>   * @rmid_busy_llc:	bitmap of which limbo RMIDs are above threshold
> @@ -178,7 +178,7 @@ struct rdt_ctrl_domain {
>   * @mbm_work_cpu:	worker CPU for MBM h/w counters
>   * @cqm_work_cpu:	worker CPU for CQM h/w counters
>   */
> -struct rdt_mon_domain {
> +struct rdt_l3_mon_domain {
>  	struct rdt_domain_hdr		hdr;
>  	unsigned int			ci_id;
>  	unsigned long			*rmid_busy_llc;
> @@ -334,10 +334,10 @@ struct resctrl_cpu_defaults {
>  };
>  
>  struct resctrl_mon_config_info {
> -	struct rdt_resource	*r;
> -	struct rdt_mon_domain	*d;
> -	u32			evtid;
> -	u32			mon_config;
> +	struct rdt_resource		*r;
> +	struct rdt_l3_mon_domain	*d;
> +	u32				evtid;
> +	u32				mon_config;
>  };
>  
>  /**
> @@ -530,7 +530,7 @@ struct rdt_domain_hdr *resctrl_find_domain(struct list_head *h, int id,
>   *
>   * This can be called from any CPU.
>   */
> -void resctrl_arch_reset_rmid(struct rdt_resource *r, struct rdt_mon_domain *d,
> +void resctrl_arch_reset_rmid(struct rdt_resource *r, struct rdt_l3_mon_domain *d,
>  			     u32 closid, u32 rmid,
>  			     enum resctrl_event_id eventid);
>  
> @@ -543,7 +543,7 @@ void resctrl_arch_reset_rmid(struct rdt_resource *r, struct rdt_mon_domain *d,
>   *
>   * This can be called from any CPU.
>   */
> -void resctrl_arch_reset_rmid_all(struct rdt_resource *r, struct rdt_mon_domain *d);
> +void resctrl_arch_reset_rmid_all(struct rdt_resource *r, struct rdt_l3_mon_domain *d);
>  
>  /**
>   * resctrl_arch_reset_all_ctrls() - Reset the control for each CLOSID to its
> diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
> index 58dca892a5df..224b71730cc3 100644
> --- a/arch/x86/kernel/cpu/resctrl/internal.h
> +++ b/arch/x86/kernel/cpu/resctrl/internal.h
> @@ -51,7 +51,7 @@ struct rdt_hw_ctrl_domain {
>  };
>  
>  /**
> - * struct rdt_hw_mon_domain - Arch private attributes of a set of CPUs that share
> + * struct rdt_hw_l3_mon_domain - Arch private attributes of a set of CPUs that share
>   *			      a resource for a monitor function

Could you please fix this alignment?

>   * @d_resctrl:	Properties exposed to the resctrl file system
>   * @arch_mbm_states:	Per-event pointer to the MBM event's saved state.
> @@ -60,8 +60,8 @@ struct rdt_hw_ctrl_domain {
>   *
>   * 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];

Also here, please align struct member names.

>  };
>  
Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ