From: sashiko-bot@kernel.org
To: "Luigi Rizzo" <lrizzo@google.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v5 4/7] genirq: Integrate GSIM into interrupt flow
Date: Wed, 19 Aug 2026 12:58:22 +0000 [thread overview]
Message-ID: <20260819125822.E0B141F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260819124341.4185621-5-lrizzo@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Overloading IRQD_IRQ_INPROGRESS for GSIM breaks __synchronize_hardirq() by introducing prolonged busy-waiting and potential deadlocks.
--
--- Patch [4]: [PATCH v5 4/7] genirq: Integrate GSIM into interrupt flow ---
commit 8749b57516c52ba231f3249d6f52173005693e96
Author: Luigi Rizzo <lrizzo@google.com>
Subject: genirq: Integrate GSIM into interrupt flow
This commit integrates Generic Software Interrupt Moderation (GSIM) into
the handle_edge_irq() and handle_fasteoi_irq() flows. It introduces
irq_moderation_allow() to validate IRQ eligibility, defaults moderation to
disabled during setup, and ensures the state is cleared during IRQ teardown.
> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
> index de754db414d1d..04a30ba04e78b 100644
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
[ ... ]
> @@ -500,6 +501,10 @@ static bool irq_can_handle_pm(struct irq_desc *desc)
> return false;
> }
>
> + /* Moderated interrupts have IRQD_IRQ_INPROGRESS and need early return. */
> + if (irqd_is_moderated(irqd))
> + return false;
> +
[Severity: High]
The comment mentions that moderated interrupts have IRQD_IRQ_INPROGRESS
set. Could this cause a prolonged busy-wait or deadlock in
__synchronize_hardirq() when a driver calls disable_irq() or free_irq()
while the moderation timer is active?
__synchronize_hardirq() uses a tight loop to wait for this flag to clear:
kernel/irq/manage.c:__synchronize_hardirq() {
...
while (irqd_irq_inprogress(&desc->irq_data))
cpu_relax();
...
}
If the flag remains active for the entire duration of the moderation
hrtimer, any teardown or suspend/resume operation would busy-spin
for that entire duration.
Additionally, if synchronize_irq() is called with local interrupts disabled
on the CPU where the moderation timer is pinned, would this hard-deadlock
the system since the hrtimer can never fire to clear the flag?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260819124341.4185621-1-lrizzo@google.com?part=4
next prev parent reply other threads:[~2026-08-19 12:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 12:43 [PATCH v5 0/7] Global Software Interrupt Moderation (GSIM) Luigi Rizzo
2026-08-19 12:43 ` [PATCH v5 1/7] genirq: Add flags for software interrupt moderation Luigi Rizzo
2026-08-19 12:50 ` sashiko-bot
2026-08-19 12:43 ` [PATCH v5 2/7] genirq: Add GSIM infrastructure Luigi Rizzo
2026-08-19 12:48 ` sashiko-bot
2026-08-19 12:43 ` [PATCH v5 3/7] genirq: Implement core GSIM moderation logic Luigi Rizzo
2026-08-19 12:52 ` sashiko-bot
2026-08-19 12:43 ` [PATCH v5 4/7] genirq: Integrate GSIM into interrupt flow Luigi Rizzo
2026-08-19 12:58 ` sashiko-bot [this message]
2026-08-19 12:43 ` [PATCH v5 5/7] genirq: Add GSIM user space configuration (procfs) Luigi Rizzo
2026-08-19 12:58 ` sashiko-bot
2026-08-19 12:43 ` [PATCH v5 6/7] genirq: Adaptive Global Software Interrupt Moderation (GSIM) Luigi Rizzo
2026-08-19 12:59 ` sashiko-bot
2026-08-19 12:43 ` [PATCH v5 7/7] PCI/MSI: re-enable conditional parent mask/unmask with sw moderation Luigi Rizzo
2026-08-19 12:51 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260819125822.E0B141F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lrizzo@google.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.