Re: [POSSIBLE BUG] behavior change in irq_can_handle_pm() introduced in 8d39d6ec4db5d

From: Luigi Rizzo

Date: Thu Nov 13 2025 - 04:03:10 EST


On Sat, Nov 8, 2025 at 10:30 PM Luigi Rizzo <lrizzo@xxxxxxxxxx> wrote:
>
> BACKGROUND (just to explain how I found the issue; it may exist regardless):
>
> I have some code (soon to be posted here) to implement interrupt moderation
> in software using using per-CPU hrtimers. The basic logic is the following:
>
> - if the system decides an irq needs moderation, it calls disable_irq_nosync(),
> adds the irq_desc in a per-cpu list, and keeps IRQD_IRQ_INPROGRESS set
> to prevent migration. The first desc inserted in the list also start

never mind this thread. I found that disable_irq_nosync()
is enough to make irq_can_handle() return false
(through irq_can_handle_actions()) and that prevents
handle_edge_irq() from calling the handler.
In the end, that simplifies my use case!

Sorry for the noise.

cheers
luigi