[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0aa452af-0033-4efc-b280-be1e41e42ac7@intel.com>
Date: Wed, 12 Nov 2025 11:18:59 -0800
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>, Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v13 05/32] x86,fs/resctrl: Refactor domain create/remove
using struct rdt_domain_hdr
Hi Tony,
On 10/29/25 9:20 AM, Tony Luck wrote:
> diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
> index 0320360cd7a6..f5a65c48bcab 100644
> --- a/fs/resctrl/rdtgroup.c
> +++ b/fs/resctrl/rdtgroup.c
> @@ -3164,13 +3164,18 @@ static void mon_rmdir_one_subdir(struct kernfs_node *pkn, char *name, char *subn
> * when last domain being summed is removed.
> */
> static void rmdir_mondata_subdir_allrdtgrp(struct rdt_resource *r,
> - struct rdt_mon_domain *d)
> + struct rdt_domain_hdr *hdr)
> {
> struct rdtgroup *prgrp, *crgrp;
> + struct rdt_mon_domain *d;
> char subname[32];
> bool snc_mode;
> char name[32];
>
> + if (!domain_header_is_valid(hdr, RESCTRL_MON_DOMAIN, RDT_RESOURCE_L3))
> + return;
> +
> + d = container_of(hdr, struct rdt_mon_domain, hdr);
> snc_mode = r->mon_scope == RESCTRL_L3_NODE;
> sprintf(name, "mon_%s_%02d", r->name, snc_mode ? d->ci_id : d->hdr.id);
Please note that this patch is inconsistent in how the functions are modified to access
members of struct rdt_domain_hdr now that it is provided as a parameter. For example, the
above d->hdr.id is unchanged while a similar line in mkdir_mondata_subdir() changes the
d->hdr.id to hdr->id.
This becomes irrelevant when considering the refactoring that comes later in the series but
a reviewer cannot be expected to know that at this point.
Reinette
Powered by blists - more mailing lists