linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@fluxnic.net>
To: Andi Kleen <andi@firstfloor.org>
Cc: npiggin@gmail.com, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)
Date: Wed, 12 Jul 2017 13:34:46 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1707121331060.1959@knanqh.ubzr> (raw)
In-Reply-To: <87a849aaa3.fsf@firstfloor.org>

On Wed, 12 Jul 2017, Andi Kleen wrote:

> Nicholas Piggin <npiggin@gmail.com> writes:
> >> 
> >> I think we should aim for gc-sections to be used by default and have LTO 
> >> as a possible option only.
> >
> > I agree after it starts getting implemented and debugged by small
> > system users, we could make it default in the interest of sharing
> > testing and reducing combinations.
> 
> From what i understand the main drawback in the past was
> is that various linker versions become very slow with thousands of
> sections.
> 
> So it may cost you built time. For a special small build it's probably
> ok, but you wouldn't want to make it default.
> 
> Also usually it's only useful without modules because if you
> use modules EXPORT_SYMBOL pulls in a lot of unused functions.

I created CONFIG_TRIM_UNUSED_KSYMS mainly to avoid that issue. It is 
highly effective with either gc-sections and LTO.


Nicolas

  reply	other threads:[~2017-07-12 17:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09  3:13 [RFC PATCH] x86: enable dead code and data elimination (LTO) Nicholas Piggin
2017-07-09  9:05 ` Ingo Molnar
2017-07-09 13:29   ` Masahiro Yamada
2017-07-09 13:59     ` Nicolas Pitre
2017-07-10  2:13       ` Nicholas Piggin
2017-07-12 16:29         ` Andi Kleen
2017-07-12 17:34           ` Nicolas Pitre [this message]
2017-07-13  2:51           ` Nicholas Piggin

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=alpine.LFD.2.20.1707121331060.1959@knanqh.ubzr \
    --to=nico@fluxnic.net \
    --cc=andi@firstfloor.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@gmail.com \
    /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).