From: Andi Kleen <ak@linux.intel.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] init.h: mark init functions hot instead of cold
Date: Sat, 9 May 2015 02:17:39 -0700 [thread overview]
Message-ID: <20150509091739.GX13605@tassilo.jf.intel.com> (raw)
In-Reply-To: <1431125101-16273-1-git-send-email-linux@rasmusvillemoes.dk>
On Sat, May 09, 2015 at 12:45:01AM +0200, Rasmus Villemoes wrote:
> attribute((cold)) causes gcc to optimize the function for size rather
> than speed. But since __init functions will be discarded anyway, I
> don't see why memory should be a concern. On the contrary, everybody
It makes the bzImage smaller.
A lot of people on smaller systems are interested in flash size.
> wants their box to boot faster. Using the opposite attribute, hot,
> causes gcc to optimize the functions more aggressively, possibly at
> the expense of larger (.init).text. A completely unscientific test
> showed about 2% faster boot time: I booted a kernel in qemu with and
> without this patch five times each; the boot times were very stable in
> each case, so I think the 2% is ok, but of course only applies to that
> specific .config running in a virtual machine on my hardware.
2% on boot is basically noise.
-Andi
next prev parent reply other threads:[~2015-05-09 9:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 22:45 Rasmus Villemoes
2015-05-09 9:17 ` Andi Kleen [this message]
2015-05-09 21:17 ` Josh Triplett
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=20150509091739.GX13605@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mingo@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
Powered by JetHome