All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Andi Kleen <ak@colin2.muc.de>
Cc: Jan Hubicka <jh@suse.cz>, Andi Kleen <ak@muc.de>,
	torvalds@osdl.org, akpm@osdl.org, rth@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Use -fno-unit-at-a-time if gcc supports it
Date: Fri, 5 Sep 2003 13:59:38 -0400	[thread overview]
Message-ID: <20030905175938.GA29353@gtf.org> (raw)
In-Reply-To: <20030905172715.GA80302@colin2.muc.de>

On Fri, Sep 05, 2003 at 07:27:15PM +0200, Andi Kleen wrote:
> I'm not sure that is that good an idea. When I was still hacking 
> TCP I especially moved some stuff out-of-line in the fast path to avoid 
> register pressure. Otherwise gcc would inline rarely used sub functions 
> and completely mess up the register allocation in the fast path.
> Of course just a call alone messes up the registers somewhat because
> of its clobbers, but a full inlining is usually worse.
[...]
> I suspect that is true for a lot of core kernel code - everything
> that is worth inlining is already inlined and for the rest it doesn't matter.

Definitely , agreed.  In fact, we are moving in the opposite direction:
looking into what we can un-inline...


> On the other hand a lot of driver code seems to be written without
> manual consideration for inline. For that it may be worth it. But then
> I would consider core kernel code to be more important than driver
> code.

Modern network drivers seem fairly aware of it ;-)

> Also I fear cross module inlining would expose a lot of latent bugs
> (missing barriers etc.) when the optimizer becomes more aggressive. 
> I'm not saying this would be a bad thing, just that it may be a lot 
> of work to fix (both for compiler and kernel people)

Agreed.

	Jeff




  reply	other threads:[~2003-09-05 17:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-05  0:47 [PATCH] Use -fno-unit-at-a-time if gcc supports it Andi Kleen
2003-09-05  1:05 ` Aaron Lehmann
2003-09-05  1:24   ` Andi Kleen
2003-09-05  5:37 ` Jan Hubicka
2003-09-05 17:27   ` Andi Kleen
2003-09-05 17:59     ` Jeff Garzik [this message]
2003-09-06  7:08     ` Jan Hubicka
2003-09-05 14:54 ` Linus Torvalds
2003-09-05 15:17   ` Andreas Jaeger
2003-09-05 16:16     ` Robert Love
2003-09-05 16:10       ` Andreas Jaeger
2003-09-06  7:06       ` Jan Hubicka
2003-09-05 17:19     ` Jakub Jelinek
2003-09-05 17:30     ` Andi Kleen
2003-09-08  9:48     ` Helge Hafting
     [not found] <sqnW.3zE.13@gated-at.bofh.it>
     [not found] ` <sqHd.3Yj.1@gated-at.bofh.it>
     [not found]   ` <srtA.53H.1@gated-at.bofh.it>
     [not found]     ` <sFmW.78P.13@gated-at.bofh.it>
2003-09-06  8:10       ` David Mosberger-Tang
2003-09-08 20:32         ` David Mosberger

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=20030905175938.GA29353@gtf.org \
    --to=jgarzik@pobox.com \
    --cc=ak@colin2.muc.de \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=jh@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@redhat.com \
    --cc=torvalds@osdl.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 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.