Re: [PATCH v11 19/23] x86/resctrl: Export interface to report telemetry unbind/remove
From: Luck, Tony
Date: Wed Sep 16 2026 - 12:33:44 EST
On Wed, Sep 09, 2026 at 09:08:29PM -0700, Reinette Chatre wrote:
> Hi Tony,
>
> On 8/31/26 10:44 AM, Tony Luck wrote:
>
> ...
>
> > diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c
> > index c3bd3536c514..5cd2711d00e7 100644
> > --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c
> > +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c
>
> ..
>
> > @@ -439,6 +462,8 @@ int intel_aet_read_event(int domid, u32 rmid, void *arch_priv, u64 *val)
> > void *pevt0;
> > u32 idx;
> >
> > + guard(mutex)(&aet_register_lock);
> > +
>
> hmmm ... this means that reading an event can sleep now ... but it is still
> possible to call this via IPI (smp_call_function_any()) if the CPU is part
> of the nohz_full subset?
All AET events are implemented with counters in MMIO space and can be
read from any CPU. So this check in mon_event_read() bypasses the
check for nohz CPUs:
if (evt->any_cpu) {
mon_event_count(rr);
goto out_ctx_free;
}
But even if it didn't, is there some prohibition for nohz CPUs to
sleep? I can see possible issues with a timed delay that might rely on a
clock tick to wake. But it would seem that any read(2) system call
from a regular file might sleep waiting for I/O completion.
> > pevt0 = pevt - pevt->idx;
> > e = container_of(pevt0, struct event_group, evts);
> > idx = rmid * e->num_events;
>
> Reinette
-Tony