From: Dave Hansen <dave.hansen@intel.com>
To: Petr Pavlu <petr.pavlu@suse.com>,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com
Cc: nathan@kernel.org, ndesaulniers@google.com, trix@redhat.com,
corbet@lwn.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] x86: Avoid relocation information in final vmlinux
Date: Mon, 20 Mar 2023 13:12:07 -0700 [thread overview]
Message-ID: <e8a36925-2965-1dae-da01-5d06ba6747c8@intel.com> (raw)
In-Reply-To: <20230320121006.4863-1-petr.pavlu@suse.com>
On 3/20/23 05:10, Petr Pavlu wrote:
> The issue is then that the collected vmlinux file and hence distribution
> packages end up unnecessarily large because of this extra data. The
> following is a size comparison of vmlinux v6.0 with and without the
> relocation information:
> | Configuration | With relocs | Stripped relocs |
> | x86_64_defconfig | 70 MB | 43 MB |
> | +CONFIG_DEBUG_INFO | 818 MB | 367 MB |
>
> Optimize a resulting vmlinux by adding a postlink step that splits the
> relocation information into vmlinux.relocs and then strips it from the
> vmlinux binary.
When I saw that this adds a postlink step, I read that as, "adds another
step to the unbearably slow single-threaded part of kernel builds". :)
But, here's one data point that made me feel a lot better. Using a
random .config:
> https://sr71.net/~dave/intel/config-reloctest
the builds get a _bit_ slower, going from 37.0s->37.7s. This is pretty
arbitrary of course, using my compiler on my hardware, so YMMV. But,
for me, this seems like a reasonable tradeoff given the space savings.
I'd be curious what other people are seeing.
next prev parent reply other threads:[~2023-03-20 20:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 12:10 [PATCH v5] x86: Avoid relocation information in final vmlinux Petr Pavlu
2023-03-20 18:35 ` Nick Desaulniers
2023-03-21 11:57 ` Borislav Petkov
2023-03-24 10:31 ` Petr Pavlu
2023-03-24 10:30 ` Petr Pavlu
2023-03-20 20:12 ` Dave Hansen [this message]
2023-03-21 5:23 ` Nathan Chancellor
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=e8a36925-2965-1dae-da01-5d06ba6747c8@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=petr.pavlu@suse.com \
--cc=tglx@linutronix.de \
--cc=trix@redhat.com \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).