From: Sam Ravnborg <sam@ravnborg.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, Adrian Bunk <bunk@kernel.org>,
Alexey Starikovskiy <aystarik@gmail.com>,
lenb@kernel.org, astarikovskiy@suse.de,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Arjan van de Ven <arjan@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [patch] x86: phase out forced inlining
Date: Tue, 4 Mar 2008 09:03:59 +0100 [thread overview]
Message-ID: <20080304080335.GA5776@uranus.ravnborg.org> (raw)
In-Reply-To: <20080303224231.86c22ed0.akpm@linux-foundation.org>
On Mon, Mar 03, 2008 at 10:42:31PM -0800, Andrew Morton wrote:
> On Mon, 3 Mar 2008 13:13:35 +0100 Ingo Molnar <mingo@elte.hu> wrote:
>
> > +config OPTIMIZE_INLINING
> > + bool "Allow gcc to uninline functions marked 'inline'"
> > + default y
> > + help
> > + This option determines if the kernel forces gcc to inline the functions
> > + developers have marked 'inline'. Doing so takes away freedom from gcc to
> > + do what it thinks is best, which is desirable for the gcc 3.x series of
> > + compilers. The gcc 4.x series have a rewritten inlining algorithm and
> > + disabling this option will generate a smaller kernel there. Hopefully
> > + this algorithm is so good that allowing gcc4 to make the decision can
> > + become the default in the future, until then this option is there to
> > + test gcc for this.
>
> urgh. This will cause whatever problem
> 4507a6a59cfc6997e532cd812a8bd244181e6205 fixed five years ago to resurface
> for incautious gcc-3.x users.
>
> I'd suggest that this
>
> > +#ifndef CONFIG_OPTIMIZE_INLINING
>
> become something along the lines of
>
> > +#ifndef CONFIG_OPTIMIZE_INLINING && (__GNUC__ > 3)
>
> It would be nice to be able to feed the gcc version into the Kconfig logic,
> really..
We can do this using a few environment options.
Somewhere in a Makefile:
export CC_MAJOR=`magic`
export CC_MINOR=`more magic`
And in a Kconfig file:
config CC_MAJOR
string
option env=CC_MAJOR
And then we can do:
config CC_DEFAULT_INLINE
bool "Force inline of functions annotated inline"
default y if CC_MAJOR = 04
Shall I try to cook up a patch for this?
[I may get access to my dev box tonight - cannot promise..]
Sam
next prev parent reply other threads:[~2008-03-04 8:26 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-01 16:19 [2.6 patch] acpi/battery.c: make 2 functions static Adrian Bunk
2008-03-01 18:26 ` Alexey Starikovskiy
2008-03-01 18:35 ` Adrian Bunk
2008-03-01 18:42 ` Alexey Starikovskiy
2008-03-01 18:45 ` Adrian Bunk
2008-03-03 8:57 ` Ingo Molnar
2008-03-03 9:13 ` Adrian Bunk
2008-03-03 9:17 ` Ingo Molnar
2008-03-03 9:31 ` Sam Ravnborg
2008-03-03 9:48 ` Adrian Bunk
2008-03-03 10:39 ` Ingo Molnar
2008-03-03 11:34 ` Adrian Bunk
2008-03-03 11:45 ` Ingo Molnar
2008-03-03 12:02 ` Adrian Bunk
2008-03-03 12:10 ` Ingo Molnar
2008-03-03 12:29 ` Adrian Bunk
2008-03-03 12:50 ` Ingo Molnar
2008-03-03 14:54 ` Adrian Bunk
2008-03-03 15:01 ` Adrian Bunk
2008-03-04 13:16 ` Ingo Molnar
2008-03-04 13:47 ` Adrian Bunk
2008-03-04 14:22 ` Ingo Molnar
2008-03-04 14:36 ` Jörn Engel
2008-03-04 14:45 ` Ingo Molnar
2008-03-03 12:13 ` [patch] x86: phase out forced inlining Ingo Molnar
2008-03-03 14:56 ` Sam Ravnborg
2008-03-04 16:46 ` Ingo Molnar
2008-03-04 18:07 ` Harvey Harrison
2008-03-04 18:09 ` H. Peter Anvin
2008-03-04 18:14 ` Harvey Harrison
2008-03-04 18:18 ` Harvey Harrison
2008-03-03 15:01 ` Arjan van de Ven
2008-03-03 15:58 ` Harvey Harrison
2008-03-04 6:42 ` Andrew Morton
2008-03-04 7:32 ` Ingo Molnar
2008-03-04 8:00 ` Andrew Morton
2008-03-04 9:50 ` Andi Kleen
2008-03-04 8:03 ` Sam Ravnborg [this message]
2008-03-04 8:38 ` Andrew Morton
2008-03-03 9:45 ` [2.6 patch] acpi/battery.c: make 2 functions static Adrian Bunk
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=20080304080335.GA5776@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=astarikovskiy@suse.de \
--cc=aystarik@gmail.com \
--cc=bunk@kernel.org \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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