From: Adrian Bunk <bunk@stusta.de>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: Rob Landley <rob@landley.net>, linux-kernel@vger.kernel.org
Subject: Re: Status of CONFIG_FORCED_INLINING?
Date: Wed, 23 May 2007 23:22:37 +0200 [thread overview]
Message-ID: <20070523212237.GH2098@stusta.de> (raw)
In-Reply-To: <46549937.1030306@linux.intel.com>
On Wed, May 23, 2007 at 12:42:47PM -0700, Arjan van de Ven wrote:
> Rob Landley wrote:
>> I notice that feature-removal-schedule.txt has CONFIG_FORCED_INLINING
>> scheduled to go away most of a year ago. My question is what replaces it:
>> Does #define inline __always_inline become the new standard and uses of
>> __always_inline be removed, or should all instances of "inline" either be
>> removed or replaced with __always_inline? (Or are there going to be two
>> keywords meaning exactly the same thing going forward?)
>
> it should be that we do not force gcc to inline on the "normal" inline
> keyword, and we mark the cases that HAVE to be inlined for correctness
> reasons as __always_inline.
What about performance reasons?
We habe "inline" code in header files that heavily relies on being
nearly completely optimized away after being inlined.
Especially with -Os it could even sound logical for a compiler to never
inline a non-forced "inline"'d three line function with 2 callers.
And we need only two different inline levels (__always_inline and
"let the compiler decide"), not three (__always_inline, inline and
"let the compiler decide").
The rules are simple:
- every static function in a header file must be __always_inline
- no function in a C file should be marked as __always_inline/inline
- in extreme rare cases there might be exceptions from the latter
Your suggestion is possible, but please also send a patch that turns
every "inline" in header files into __always_inline...
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
next prev parent reply other threads:[~2007-05-23 21:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 19:10 Status of CONFIG_FORCED_INLINING? Rob Landley
2007-05-23 19:42 ` Arjan van de Ven
2007-05-23 21:22 ` Adrian Bunk [this message]
2007-05-23 21:28 ` Roland Dreier
2007-05-24 12:38 ` Robert P. J. Day
2007-05-24 16:55 ` Rob Landley
2007-05-24 17:10 ` Adrian Bunk
2007-05-24 17:14 ` Roland Dreier
2007-05-24 17:47 ` Rob Landley
2007-05-24 17:47 ` Arjan van de Ven
2007-05-24 18:14 ` Rob Landley
2007-05-24 17:55 ` Roland Dreier
2007-05-24 18:07 ` Adrian Bunk
2007-05-24 18:32 ` Roland Dreier
2007-05-24 22:41 ` Adrian Bunk
2007-05-24 17:57 ` Adrian Bunk
2007-05-23 21:31 ` Arjan van de Ven
2007-05-24 17:12 ` Adrian Bunk
2007-05-24 16:29 ` Jan Engelhardt
2007-05-24 17:14 ` Adrian Bunk
2007-05-24 17:17 ` Arjan van de Ven
2007-05-24 17:40 ` Rob Landley
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=20070523212237.GH2098@stusta.de \
--to=bunk@stusta.de \
--cc=arjan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
/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