[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DS7PR11MB6077A0323678A68DF5878C0CFCE1A@DS7PR11MB6077.namprd11.prod.outlook.com>
Date: Wed, 8 Oct 2025 22:29:57 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: "Chatre, Reinette" <reinette.chatre@...el.com>
CC: Fenghua Yu <fenghuay@...dia.com>, "Wieczor-Retman, Maciej"
<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 C" <yu.c.chen@...el.com>, "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"patches@...ts.linux.dev" <patches@...ts.linux.dev>
Subject: RE: [PATCH v11 20/31] fs/resctrl: Refactor Sub-NUMA Cluster (SNC) in
mkdir/rmdir code flow
> > static int mkdir_mondata_subdir(struct kernfs_node *parent_kn,
> > struct rdt_domain_hdr *hdr,
> > struct rdt_resource *r, struct rdtgroup *prgrp)
> > {
> > lockdep_assert_held(&rdtgroup_mutex);
> >
> > if (r->mon_scope == RESCTRL_L3_NODE)
> > return mkdir_mondata_subdir_snc(parent_kn, hdr, r, prgrp);
> >
> > ... pruned version of original code without SNC bits ...
> > }
> >
> > and:
> >
> > static void rmdir_mondata_subdir_allrdtgrp(struct rdt_resource *r,
> > struct rdt_domain_hdr *hdr)
> > {
> > if (r->mon_scope == RESCTRL_L3_NODE) {
> > rmdir_mondata_subdir_allrdtgrp_snc(r, hdr);
> > return;
> > }
> >
> > ... pruned version of original code without SNC bits ...
> > }
>
> Indeed, this will keep the functions generic in the sense that it operates
> on all resource types. This looks good since I think once the SNC code is taken
> what remains should be easy to follow.
> I think it may also help to (in addition to the mon_scope check) add a RDT_RESOURCE_L3
> check before the SNC code to keep the pattern that SNC only applies to the L3 resource.
Reinette,
The SNC versions to make and remove directories need to get the rdt_l3_mon_domain from
hdr. So they both begin with the standard:
if (!domain_header_is_valid(hdr, RESCTRL_MON_DOMAIN, RDT_RESOURCE_L3))
return -EINVAL;
d = container_of(hdr, struct rdt_l3_mon_domain, hdr);
[though rmdir function returns void, so doesn't have that "-EINVAL".]
-Tony
Powered by blists - more mailing lists