Re: [PATCH v7 11/14] mpam,x86/resctrl: Resolve INTEL_PMT_TELEMETRY symbols at runtime
From: Reinette Chatre
Date: Wed Jun 10 2026 - 12:29:41 EST
Hi Tony,
On 6/10/26 8:49 AM, Luck, Tony wrote:
> On Wed, Jun 10, 2026 at 08:27:15AM -0700, Reinette Chatre wrote:
>> On 6/9/26 5:08 PM, Luck, Tony wrote:
>>> On Mon, Jun 08, 2026 at 04:25:51PM -0700, Reinette Chatre wrote:
>>>>> +void intel_aet_unmount(void)
>>>>> {
>>>>> struct event_group **peg;
>>>>>
>>>>> + guard(mutex)(&aet_register_lock);
>>>>
>>>> Could this get a short-circuit to make behavior on AMD obvious?
>>>
>>> Like this?
>>>
>>> if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
>>> return;
>>>
>>> Same in intel_aet_pre_mount() for symmetry??
>>
>> I do not see that this requires to be architecture specific. This capability
>> introduces AET register()/unregister() and pre_mount()/unmount().
>> pre_mount() already does no-op if (essentially) nothing is registered. Could
>> unmount() similarly be a no-op if (essentially) nothing is registered?
>
> Ah, I see. Maybe I just need a better name for my "have_pmt_hold" flag
> so it can be used as the fast exit indicator in intel_aet_unmount().
>
> Perhaps "pmt_in_use"?
>
> Then:
>
> if (!pmt_in_use)
> return;
Something like this. It is not obvious to me how the rest of unmount will look
with this.
Ideally it will be something symmetrical to pre_mount() to make the
flow and short-circuit of the flow obvious.
Reinette