From: Andi Kleen <ak@colin2.muc.de>
To: Jan Hubicka <jh@suse.cz>
Cc: 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: 5 Sep 2003 19:27:15 +0200 [thread overview]
Date: Fri, 5 Sep 2003 19:27:15 +0200 [thread overview]
Message-ID: <20030905172715.GA80302@colin2.muc.de> (raw)
In-Reply-To: <20030905053730.GB24509@kam.mff.cuni.cz>
> How much work would be to fix kernel in this regard?
The big problem is that -funit-at-a-time is not widely used yet,
so even if we fix the kernel at some point it would likely
get broken again all the time by people who use older kernels
(= most kernel developers currently)
> Are there some cases where this is esential? Kernel would be nice
> target to whole program optimization and GCC is not that far from it
> right now.
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.
That was a long time ago, of course the code has significantly changed by
then.
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.
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.
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)
-Andi
next prev parent reply other threads:[~2003-09-05 17:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-05 0:47 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 [this message]
2003-09-05 17:59 ` Jeff Garzik
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=20030905172715.GA80302@colin2.muc.de \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome