linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: Timothy Miller <miller@techsource.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] add an -Os config option
Date: Tue, 12 Aug 2003 17:58:47 +0200	[thread overview]
Message-ID: <20030812155847.GF569@fs.tum.de> (raw)
In-Reply-To: <3F390B36.5050709@techsource.com>

On Tue, Aug 12, 2003 at 11:43:50AM -0400, Timothy Miller wrote:
> 
> 
> Christoph Hellwig wrote:
> >On Mon, Aug 11, 2003 at 11:11:45PM +0200, Adrian Bunk wrote:
> >
> >>The patch below adds an option OPTIMIZE_FOR_SIZE (depending on EMBEDDED) 
> >>that changes the optimization from -O2 to -Os.
> >
> >
> >Please dropt the if EMBEDDED - this makes perfecty sense for lots of
> >todays hardware..
> >
> >In fact we should probably rather do some some benchmarking whether it
> >would be a good idea to make -Os the default.
> 
> 
> Interesting thought...  In reality, we want the system to spend as 
> little time in the kernel as possible.  If we've done that job right, 
> then optimizing for size shouldn't matter as much.  We're still spending 
> most of our time in user space.
> 
> Furthermore, it may be that we could benefit from compiling some source 
> files with -Os and others with -O2, depending on how critical they are 
> and how much they are ACTUALLY affected.
>...
> Comments?

First of all, compiling my own kernel with gcc 3.3.1 resulted in less 
than 10% difference in the size of the kernel image (and ACPI is not 
part of my kernel) - the mere difference in size isn't that important 
except for special needs (like boot _floppies_ or embedded systems 
with very limited memory).

The benchmarking Christoph was referring to was to check whether a 
kernel completely compiled with -Os is faster than a kernel compiled 
with -O2. This might sound strange, but if the code is smaller more fits 
into the cache and modern CPUs suffer much every time they need to 
access the incredibly slow RAM.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2003-08-12 15:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-11 21:11 [2.6 patch] add an -Os config option Adrian Bunk
2003-08-11 21:19 ` Michael Buesch
2003-08-11 21:37   ` Mike Fedyk
2003-08-11 21:39   ` Christophe Saout
2003-08-11 21:41   ` Dagfinn Ilmari Mannsåker
2003-08-12  1:29   ` Gene Heskett
2003-08-12  2:51     ` Thomas Molina
2003-08-12  4:14       ` [OT] " Steven Cole
2003-08-12 15:25         ` Timothy Miller
2003-08-12 14:48       ` Gene Heskett
2003-08-12 10:11     ` Michael Buesch
2003-08-12 14:42       ` Gene Heskett
2003-08-12  1:45   ` Warren Turkal
2003-08-11 22:20 ` Russell King
2003-08-12  7:06 ` Christoph Hellwig
2003-08-12 15:43   ` Timothy Miller
2003-08-12 15:58     ` Adrian Bunk [this message]
2003-08-12 16:03     ` Kevin P. Fleming
2003-08-12 13:35 ` Alan Cox
2003-08-12 15:45   ` Joe Korty
2003-08-12 18:03   ` Timothy Miller
2003-08-12 19:43 John Bradford

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=20030812155847.GF569@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miller@techsource.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).