lkml.org 
[lkml]   [2015]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] init.h: mark init functions hot instead of cold
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


\
 
 \ /
  Last update: 2015-05-09 11:41    [W:0.046 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site