From: Marc Zyngier <maz@kernel.org>
To: Joshua Machauer <machaujo@amazon.de>
Cc: Thomas Gleixner <tglx@kernel.org>, Radu Rendec <radu@rendec.net>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <nh-open-source@amazon.com>,
Joshua Machauer <machaujo@amazon.com>
Subject: Re: [PATCH] irqchip/gic-v3: Remember each CPU's redistributor from the init walk
Date: Sun, 25 Oct 2026 10:48:33 +0000 [thread overview]
Message-ID: <867bj6ys1q.wl-maz@kernel.org> (raw)
In-Reply-To: <20261023181510.50634-1-machaujo@amazon.de>
On Fri, 23 Oct 2026 19:15:10 +0100,
Joshua Machauer <machaujo@amazon.de> wrote:
>
> From: Joshua Machauer <machaujo@amazon.com>
>
> On systems that give every CPU its own redistributor frame, a CPU coming
Is there *any* sort of GICv3-based systems that do not match this
description?
> online finds its frame by walking the frames from the first one until
> GICR_TYPER matches its affinity. CPU n therefore performs O(n) MMIO
> reads, and bringing up N CPUs costs O(N^2). Secondary CPUs boot
> serially, so all of it adds to boot time.
>
> gic_update_rdist_properties() already walks every frame once at boot.
> Record each possible CPU's frame there and have gic_populate_rdist() try
> it first, so bringing a CPU online costs one MMIO read. A CPU without a
> recorded frame, such as an ACPI online-capable CPU absent at init, still
> scans.
>
> Recording compares each frame's affinity against that of every possible
> CPU. That is still O(N^2) work at init, but it reads cpu_logical_map[],
> which stays in the cache, instead of device memory.
>
> The frame is kept apart from rd_base, which
> inherit_vpe_l1_table_from_rd() reads as "this CPU has booted".
But this is a pointless duplication of the existing tracking, which
could equally be solved with a flag.
I'm not opposed to this, even if the gains are vanishingly small. But
it can't come at the cost of duplicated state.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2026-10-25 10:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 18:15 [PATCH] irqchip/gic-v3: Remember each CPU's redistributor from the init walk Joshua Machauer
2026-10-25 10:48 ` Marc Zyngier [this message]
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=867bj6ys1q.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=machaujo@amazon.com \
--cc=machaujo@amazon.de \
--cc=nh-open-source@amazon.com \
--cc=radu@rendec.net \
--cc=tglx@kernel.org \
/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