[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSRf0doyqsnYk3RO@willie-the-truck>
Date: Mon, 24 Nov 2025 13:38:25 +0000
From: Will Deacon <will@...nel.org>
To: Luke Yang <luyang@...hat.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Jirka Hladky <jhladky@...hat.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Joe Mario <jmario@...hat.com>
Subject: Re: [PATCH] arm64: clear_user: align __arch_clear_user() to 128B for
I-cache efficiency
On Fri, Nov 21, 2025 at 12:04:55AM -0500, Luke Yang wrote:
> On aarch64 kernels, recent changes (specifically irqbypass patch
> https://lore.kernel.org/all/20250516230734.2564775-6-seanjc@google.com/)
> shifted __arch_clear_user() such that the tight zeroing loop straddles
> I-cache lines. This causes measurable read performance regression when
> reading from /dev/zero.
>
> Add `.p2align 6` (64-byte alignment) to guarantee the loop stays within a
> single I-cache boundary, restoring the previous IPC and throughput.
Hmm, but what's special about __arch_clear_user()? If we make this change,
anybody could surely make similar arguments for other functions on their
hot paths?
Amusingly, there's CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B to play around
with that and it sounds like the irqbyass change you cite calls into
the category of changes highlighted by the Kconfig text.
Will
Powered by blists - more mailing lists