[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3253bf3-6a3f-4cf4-b3fd-dc55e7bc71a9@intel.com>
Date: Wed, 7 Jan 2026 09:29:27 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: "Luck, Tony" <tony.luck@...el.com>, Borislav Petkov <bp@...en8.de>
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 v17 13/32] x86,fs/resctrl: Add an architectural hook
called for each mount
Hi Tony,
On 1/5/26 12:15 PM, Luck, Tony wrote:
>> Ok, if it works and passes testing, I could wait for you to send me an updated
>> patch and drop this one.
>
> Building and testing now.
>
> Reinette: When originally developing this you suggested that rdt_get_tree()
> should call resctrl_arch_pre_mount() on *every* mount (to make it generally
> useful should future changes need something to be done in architecture code
> on each mount).
I'm digging through the history just to refresh on why I made that comment. From what I can
tell this work always called the AET init on every mount attempt. One difference is that during
v2 it did so by taking some extra locks before doing so, but still did the AET init before
resctrl's "resctrl_mounted" check. The move to current spot (before extra locks) was made in v3,
and looking at v2 comments I could just find a request to use a generic resctrl_arch_* helper in
fs code instead of the arch specific rdt_get_intel_aet_mount() called from fs code.
>
> That flexibility isn't needed for enumerating telemetry events. Boris' suggestion
> to use DO_ONCE_SLEEPABLE() would revert to what I had in some earlier
> version where rdt_get_tree() only calls this hook on first mount.
I think I am missing something here - even the original RFC calls the AET init on
every mount. Which version are you referring to? I am also missing why DO_ONCE_SLEEPABLE()
requires a flow change.
>
> Are you OK with this? Or do you still think that the hook should be called on
> every mount?
To be specific, the current implementation calls the resctrl_arch_pre_mount() hook on
every mount *attempt*. For the hook to be called on every mount it should be after the
resctrl_mounted check. This would change resctrl_arch_pre_mount() to be called with
rdtgroup_mutex held though but that seems trouble since resctrl_arch_pre_mount() currently
follows lock ordering of domain_list_lock then rdtgroup_mutex to match lock ordering
during resctrl init.
Reinette
Powered by blists - more mailing lists