From: sashiko-bot@kernel.org
To: "Luigi Rizzo" <lrizzo@google.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v5 5/7] genirq: Add GSIM user space configuration (procfs)
Date: Wed, 19 Aug 2026 12:58:11 +0000 [thread overview]
Message-ID: <20260819125812.60CA51F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260819124341.4185621-6-lrizzo@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unconditional removal of conditionally created `allow_sw_moderation` proc entry triggers `WARN(1)` on unsupported IRQs.
--
--- Patch [5]: [PATCH v5 5/7] genirq: Add GSIM user space configuration (procfs) ---
commit fc9564358ed0238056ccb83c0aee7d6d588c4901
Author: Luigi Rizzo <lrizzo@google.com>
genirq: Add GSIM user space configuration (procfs)
Introduce procfs interfaces to configure and monitor GSIM at runtime.
This adds a global directory /proc/irq/sw_moderation/ and per-IRQ files
to individually allow or disallow moderation.
> diff --git a/kernel/irq/irq_moderation.c b/kernel/irq/irq_moderation.c
> index 2c75feb6634f3..1474d33455410 100644
> --- a/kernel/irq/irq_moderation.c
> +++ b/kernel/irq/irq_moderation.c
[ ... ]
> +void irq_moderation_procfs_add(struct irq_desc *desc, umode_t umode)
> +{
> + if (!irq_moderation_supported(desc))
> + return;
> + proc_create_data("allow_sw_moderation", umode, desc->dir,
> + &allow_flag_ops, (void *)(long)desc->irq_data.irq);
> +}
> +
> +void irq_moderation_procfs_remove(struct irq_desc *desc)
> +{
> + remove_proc_entry("allow_sw_moderation", desc->dir);
[Severity: Medium]
Will this unconditional call to remove_proc_entry() trigger a kernel warning
when unregistering an unsupported IRQ?
In irq_moderation_procfs_add() just above, the "allow_sw_moderation" procfs
entry is only created if irq_moderation_supported(desc) evaluates to true.
Because irq_moderation_procfs_remove() lacks the same check, freeing a dynamic
IRQ that doesn't support moderation will cause remove_proc_entry() to print a
warning stack trace about a missing entry.
Could we add the same !irq_moderation_supported(desc) check here to avoid
the warning?
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260819124341.4185621-1-lrizzo@google.com?part=5
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
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 [this message]
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=20260819125812.60CA51F00A3A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).