From: Marc Zyngier <maz@kernel.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: IRQ thread timeouts and affinity
Date: Tue, 14 Oct 2025 18:46:40 +0100 [thread overview]
Message-ID: <87cy6pxtof.wl-maz@kernel.org> (raw)
In-Reply-To: <wosxizbb5z3goikqglsdbrgmshith62upwnavnbqeq5dndfau3@bna46rg3w2ak>
On Tue, 14 Oct 2025 12:08:22 +0100,
Thierry Reding <thierry.reding@gmail.com> wrote:
>
[...]
> > The interrupt count for CPUs 2-7 no longer increments after taking CPU 1
> > offline. Interestingly, bringing CPU 1 back online doesn't have an
> > impact, so it doesn't go back to enabling 1:N mode.
>
> Looks like that is because gic_set_affinity() gets called with the new
> CPU mask when the CPU goes offline, but it's *not* called when the CPU
> comes back online.
Indeed, because there is no need to change the affinity as far as the
kernel is concerned -- the interrupt is on an online CPU and all is
well.
I think that's the point where a per-interrupt flag (let's call it
IRQ_BCAST for the sake of argument) is required to decide what to
do. Ideally, IRQ_BCAST would replace any notion of affinity, and you'd
get the scatter-gun behaviour all the time. Which means no adjustment
to the affinity on a CPU going offline (everything still works).
But that's assumes a bunch of other things:
- when going offline, at least DPG1NS gets set to make sure this CPU
is not a target anymore if not going completely dead (still running
secure code, for example). The kernel could do it, but...
- when going idle, should this CPU still be a target of 1:N
interrupts? That's a firmware decision what could severely impact
power on battery-bound machines if not carefully managed...
- and should a CPU wake up from such an interrupt? Again, that's a
firmware decision, and I don't know how existing implementation deal
with that stuff.
Someone needs to investigate these things, and work out all of the
above. That will give us a set of conditions under which we could do
something.
M.
--
Jazz isn't dead. It just smells funny.
next prev parent reply other threads:[~2025-10-14 17:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 11:38 IRQ thread timeouts and affinity Thierry Reding
2025-10-09 14:30 ` Marc Zyngier
2025-10-09 16:05 ` Thierry Reding
2025-10-09 17:04 ` Marc Zyngier
2025-10-09 18:11 ` Marc Zyngier
2025-10-10 13:50 ` Thierry Reding
2025-10-10 14:18 ` Marc Zyngier
2025-10-10 14:38 ` Jon Hunter
2025-10-10 14:54 ` Thierry Reding
2025-10-10 15:52 ` Jon Hunter
2025-10-10 15:03 ` Thierry Reding
2025-10-11 10:00 ` Marc Zyngier
2025-10-14 10:50 ` Thierry Reding
2025-10-14 11:08 ` Thierry Reding
2025-10-14 17:46 ` Marc Zyngier [this message]
2025-10-16 18:53 ` Thomas Gleixner
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=87cy6pxtof.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.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.