From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] arm64/kernel: jump_label: switch to relative references
Date: Thu, 28 Jun 2018 10:17:57 +0100 [thread overview]
Message-ID: <20180628091757.GA10751@arm.com> (raw)
In-Reply-To: <20180627160604.8154-4-ard.biesheuvel@linaro.org>
On Wed, Jun 27, 2018 at 06:06:02PM +0200, Ard Biesheuvel wrote:
> On a randomly chosen distro kernel build for arm64, vmlinux.o shows the
> following sections, containing jump label entries, and the associated
> RELA relocation records, respectively:
>
> ...
> [38088] __jump_table PROGBITS 0000000000000000 00e19f30
> 000000000002ea10 0000000000000000 WA 0 0 8
> [38089] .rela__jump_table RELA 0000000000000000 01fd8bb0
> 000000000008be30 0000000000000018 I 38178 38088 8
> ...
>
> In other words, we have 190 KB worth of 'struct jump_entry' instances,
> and 573 KB worth of RELA entries to relocate each entry's code, target
> and key members. This means the RELA section occupies 10% of the .init
> segment, and the two sections combined represent 5% of vmlinux's entire
> memory footprint.
>
> So let's switch from 64-bit absolute references to 32-bit relative
> references: this reduces the size of the __jump_table by 50%, and gets
> rid of the RELA section entirely.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> arch/arm64/Kconfig | 1 +
> arch/arm64/include/asm/jump_label.h | 16 ++++------------
> arch/arm64/kernel/jump_label.c | 6 +++---
> 3 files changed, 8 insertions(+), 15 deletions(-)
Looks good, cheers:
Acked-by: Will Deacon <will.deacon@arm.com>
Will
next prev parent reply other threads:[~2018-06-28 9:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 16:05 [PATCH 0/5] add support for relative references in jump tables Ard Biesheuvel
2018-06-27 16:06 ` [PATCH 1/5] kernel/jump_label: abstract jump_entry member accessors Ard Biesheuvel
2018-06-28 8:40 ` Peter Zijlstra
2018-06-27 16:06 ` [PATCH 2/5] kernel/jump_label: implement generic support for relative references Ard Biesheuvel
2018-06-28 8:50 ` Peter Zijlstra
2018-06-28 9:02 ` Ard Biesheuvel
2018-06-28 9:04 ` Ard Biesheuvel
2018-06-28 9:25 ` Peter Zijlstra
2018-06-28 9:29 ` Ard Biesheuvel
2018-06-28 9:37 ` Peter Zijlstra
2018-06-27 16:06 ` [PATCH 3/5] arm64/kernel: jump_label: switch to " Ard Biesheuvel
2018-06-28 9:17 ` Will Deacon [this message]
2018-06-27 16:06 ` [PATCH 4/5] x86: jump_label: switch to jump_entry accessors Ard Biesheuvel
2018-06-28 9:11 ` Peter Zijlstra
2018-06-28 9:14 ` Ard Biesheuvel
2018-06-27 16:06 ` [PATCH 5/5] x86/kernel: jump_table: use relative references Ard Biesheuvel
2018-06-28 8:31 ` Peter Zijlstra
2018-06-28 8:34 ` Ard Biesheuvel
2018-06-28 9:28 ` Peter Zijlstra
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=20180628091757.GA10751@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).