All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Charles Coffing <ccoffing@novell.com>, xen-devel@lists.xensource.com
Subject: Re: Re: [PATCH] clean up CFLAGS
Date: Fri, 10 Mar 2006 09:30:56 +0100	[thread overview]
Message-ID: <200603100930.57249.ak@suse.de> (raw)
In-Reply-To: <21c4557e069fe8e3330fcfffcb94b073@cl.cam.ac.uk>

On Friday 10 March 2006 15:58, Keir Fraser wrote:
> 
> On 10 Mar 2006, at 14:50, Andi Kleen wrote:
> 
> >> I've put some default CFLAGS (-Wall -O3)
> >
> > Are you sure -O3 is a good idea? In my experience it just bloats
> > .text for most projects because of its aggressive inlining. I would
> > use -O2.
> 
> That's a good question. All that patch really did was move the 
> optimisation default into Config.mk, and the general choice throughout 
> the Xen tree was -O3. But it isn't clear that's best.

The main linux kernel switched to -Os by default now. Rationale
is that for kernel code it's best to be as small in icache as possible
and the optimizations in -O2 mostly help loops etc which kernel
code doesn't tend to do a whole lot of. 

Drawback is that it used to trigger some gcc code generation books,
but at least now it seems to be ok (i'm not aware of any current issues)

On x86-64 I'm also using -fno-reorder-blocks. The main reason is that
it also makes the code a bit smaller and more important it's much easier
to read the assembly code during debugging because it matches the C code 
better.

-Andi

  reply	other threads:[~2006-03-10  8:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-09 19:42 [PATCH] clean up CFLAGS Charles Coffing
2006-03-09 19:47 ` Keir Fraser
2006-03-09 20:16   ` Charles Coffing
2006-03-09 21:31     ` Keir Fraser
2006-03-09 20:18   ` Keir Fraser
2006-03-10 14:50 ` Andi Kleen
2006-03-10 14:58   ` Keir Fraser
2006-03-10  8:30     ` Andi Kleen [this message]
2006-03-10 16:30       ` Keir Fraser
2006-03-10 15:35   ` Charles Coffing

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=200603100930.57249.ak@suse.de \
    --to=ak@suse.de \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=ccoffing@novell.com \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.