From: Ada Couprie Diaz <ada.coupriediaz@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Lucas Wei <lucaswei@google.com>, Barry Song <baohua@kernel.org>,
Vladimir Murzin <vladimir.murzin@arm.com>,
Arnd Bergmann <arnd@arndb.de>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Andre Przywara <andre.przywara@arm.com>,
Shanker Donthineni <sdonthineni@nvidia.com>,
Vikram Sethi <vsethi@nvidia.com>,
James Morse <james.morse@arm.com>, Marc Zyngier <maz@kernel.org>,
Tejun Heo <tj@kernel.org>, Oliver Upton <oupton@kernel.org>,
Will Deacon <will@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/6] arm64: alternatives: switch most used alternatives to callbacks
Date: Tue, 6 Oct 2026 18:30:21 +0100 [thread overview]
Message-ID: <e7838d78-cab8-4a14-a983-f72987a87afc@arm.com> (raw)
In-Reply-To: <asUhsMhMumCwalZt@arm.com>
Hi Catalin,
On 06/10/2026 17:28, Catalin Marinas wrote:
> Hi Ada,
>
> On Mon, Sep 28, 2026 at 02:30:28PM +0100, Ada Couprie Diaz wrote:
>> All numbers are on v7.3-rc4 building defconfig with GCC 13.3.0.
>> Only the patches mentioned are applied on each line.
>>
>> | Patches | Size (B) | | Patch | Size (B) |
>> | Base vmlinux | 172826400 | | Base Image | 52374016 |
>> | 1-3 | -71672 | | 1-3 | -65536 |
>> | 4 | -71704 | | 4 | -65536 |
>> | 1-4 | -64712 | | 1-4 | -65536 |
>> | 5-6 | +68008 | | 5-6 | -0 |
>> | All patches | + 3240 | | All patches | -65536 |
>>
>> The impact on alternatives is two-fold :
>> 1. As expected, all alternatives for the two I/O workarounds and
>> 97% of the `ARM64_HAS_VIRT_HOST_EXTN` alternatives are converted to
>> callbacks, saving 85848 bytes (20 pages).
>> 2. The raw number of alternatives *increases* by about 3% (250 new entries)
> TBH, I don't think the saving is worth the additional complexity.
Fair, I did expect it a bit but wanted to share if it could be useful.
> I wonder, could we instead move the replacement instructions to a
> separate section we can drop after patching? I can see x86 uses a
> separate .altinstr_replacement. Not sure what restrictions we have on
> arm64, e.g. if it's placed too far.
I think given the amount of alternatives we have now, there was some
distance issue, but I don't have the exact details. I can look into it !
> That said, are some of the other patches worth picking up as cleanups?
Mh, I think patches 1 and 5 are nice small cleanups by themselves,
patch 2 is less obviously useful as-is but is a start on making the
insn framework safer to use for patching (which is not really reasonable
to tackle in one go anyway).
Thanks Catalin,
Kind regards
Ada
prev parent reply other threads:[~2026-10-06 17:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 13:30 [PATCH 0/6] arm64: alternatives: switch most used alternatives to callbacks Ada Couprie Diaz
2026-09-28 13:30 ` [PATCH 1/6] arm64: insn: remove deprecated memory barrier types Ada Couprie Diaz
2026-10-07 6:21 ` Vladimir Murzin
2026-10-07 17:05 ` Ada Couprie Diaz
2026-10-09 10:19 ` Vladimir Murzin
2026-09-28 13:30 ` [PATCH 2/6] arm64: insn: make `aarch64_insn_gen_d{m,s}b()` alternative-safe Ada Couprie Diaz
2026-09-28 13:30 ` [PATCH 3/6] arm64: io: replace NVIDIA Olympus erratum alternative with callback Ada Couprie Diaz
2026-09-28 13:30 ` [PATCH 4/6] arm64: io: replace ARM erratum 832075 " Ada Couprie Diaz
2026-09-28 13:30 ` [PATCH 5/6] arm64: insn: operate on MSR/MRS sysreg field via defines Ada Couprie Diaz
2026-10-07 6:53 ` Vladimir Murzin
2026-10-07 16:31 ` Ada Couprie Diaz
2026-10-09 9:14 ` Vladimir Murzin
2026-09-28 13:30 ` [PATCH 6/6] arm64: use alternatie callback to patch TPIDR_EL1 accesses Ada Couprie Diaz
2026-10-06 16:28 ` [PATCH 0/6] arm64: alternatives: switch most used alternatives to callbacks Catalin Marinas
2026-10-06 17:30 ` Ada Couprie Diaz [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=e7838d78-cab8-4a14-a983-f72987a87afc@arm.com \
--to=ada.coupriediaz@arm.com \
--cc=andre.przywara@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=arnd@arndb.de \
--cc=baohua@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lucaswei@google.com \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=sdonthineni@nvidia.com \
--cc=tj@kernel.org \
--cc=vladimir.murzin@arm.com \
--cc=vsethi@nvidia.com \
--cc=will@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