From: Thomas Gleixner <tglx@linutronix.de>
To: Jiri Slaby <jirislaby@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Cc: Liangyan <liangyan.peng@bytedance.com>,
Yicong Shen <shenyicong.1023@bytedance.com>
Subject: Re: [patch 2/4] genirq: Move irq_wait_for_poll() to call site
Date: Tue, 22 Jul 2025 14:36:49 +0200 [thread overview]
Message-ID: <875xfktna6.ffs@tglx> (raw)
In-Reply-To: <b97f4d0d-ddb6-4fca-bf96-e9f11e00e060@kernel.org>
On Tue, Jul 22 2025 at 09:07, Jiri Slaby wrote:
>> + if (IS_ENABLED(CONFIG_SMP)) {
>> + do {
>> + raw_spin_unlock(&desc->lock);
>> + while (irqd_irq_inprogress(&desc->irq_data))
>> + cpu_relax();
>> + raw_spin_lock(&desc->lock);
>> + } while (irqd_irq_inprogress(&desc->irq_data));
>> + }
>> + /* Might have been disabled in meantime */
>> + return !irqd_irq_disabled(&desc->irq_data) && desc->action;
>
> Just noting that this line is newly evaluated on !SMP too. But it is
> still supposed to evaluate to false, given we are here on this only CPU.
It does not, but in that case the code is not reached because the check
at the call site which evaluates whether the polling CPU is the current
CPU triggers. So it does not really matter in this context.
But for the other case in handle_edge_irq() this has to return false. It
should not ever get there because interrupts are disabled while
INPROGRESS is set, emphasis on *should* :)
So I moved it back into the CONFIG_SMP conditional. Thanks for spotting
it!
tglx
next prev parent reply other threads:[~2025-07-22 12:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 18:54 [patch 0/4] genirq: Prevent migration live lock in handle_edge_irq() Thomas Gleixner
2025-07-18 18:54 ` [patch 1/4] genirq: Remove pointless local variable Thomas Gleixner
2025-07-22 12:45 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2025-07-18 18:54 ` [patch 2/4] genirq: Move irq_wait_for_poll() to call site Thomas Gleixner
2025-07-22 7:07 ` Jiri Slaby
2025-07-22 12:36 ` Thomas Gleixner [this message]
2025-07-22 12:45 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2025-07-23 6:22 ` Ingo Molnar
2025-07-18 18:54 ` [patch 3/4] genirq: Split up irq_pm_check_wakeup() Thomas Gleixner
2025-07-22 12:45 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2025-07-18 18:54 ` [patch 4/4] genirq: Prevent migration live lock in handle_edge_irq() Thomas Gleixner
2025-07-22 7:37 ` Jiri Slaby
2025-07-22 12:45 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2025-07-21 15:05 ` [External] [patch 0/4] " Liangyan
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=875xfktna6.ffs@tglx \
--to=tglx@linutronix.de \
--cc=jirislaby@kernel.org \
--cc=liangyan.peng@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shenyicong.1023@bytedance.com \
/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.