Re: [PATCH v2 2/2] perf: Don't throttle based on NMI watchdog events

From: Calvin Owens

Date: Wed Apr 29 2026 - 18:41:12 EST


On Wednesday 04/29 at 15:15 -0700, Ian Rogers wrote:
> On Wed, Apr 29, 2026 at 3:09 PM Calvin Owens <calvin@xxxxxxxxxx> wrote:
> > On Wednesday 04/29 at 20:38 +0000, sashiko-bot@xxxxxxxxxx wrote:
> > > Additionally, is it possible for user-defined PMU events with expensive
> > > overhead (like heavy eBPF programs attached to slow tracepoints) to exploit
> > > this hardcoded frequency bypass?
> >
> > No, I don't think ebpf programs run in NMI context?
>
> Unfortunately Sashiko isn't currently reading replied emails, but you
> could copy-paste this feedback into an AI.

I know it doesn't reply. I was hoping for input from somebody who knew,
more automated guessing from more LLMs is not really helpful at all :)

> BPF programs can run in the NMI context, which means they can
> introduce delays. I'm not familiar with all the side-effects of and
> restrictions on this.

Thanks for the clarification.

Thinking about it more: it seems to me that if they run from NMIs and
their runtime is unbounded, this is just a consequence of that and not a
new problem. If they are somehow bounded, then this must be bounded in
the same way.

Either way, I don't think it's a real problem as far as this patch goes.
But maybe I'm not being imaginative enough.

Thanks,
Calvin