lkml.org 
[lkml]   [2008]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] prepare kconfig inline optimization for all architectures
On Sun, Apr 27, 2008 at 11:24:28AM -0700, Linus Torvalds wrote:
> The thing is, the "inline" vs "always_inline" thing _could_ make sense,
> but sadly doesn't much.
>
> Part of it is that gcc imnsho inlines too aggressively anyway in the
> absense of "inline", so there's no way "inline" can mean "you might
> inline" this, because gcc will do that anyway even without it. As a
> result, in _practice_ "inline" and "always_inline" end up being very close
> to each other - perhaps more so than they should.

Yes, absolutely. In recent gcc versions it's in fact so bad that xfs
had to add a hack to mark every function not explicitly marker inline
noinline because otherwise gcc would inline gazillions of big functions
which combines with it's horrible liveness analysis led to enormous
stack useage. (I think the liveness part is getting better these days
to be fair)

> It will take time before we've sorted out all the fall-out, because I bet
> there is still code out there that _should_ use __always_inline, but
> doesn't.

Given that __always_inline only shows up in non-x86 arch code in
homeopathic quantity it's a fair bet that there's a lot of breakage
waiting there. Which was one of the initial complains about the way
it's done..


\
 
 \ /
  Last update: 2008-04-27 20:35    [from the cache]
©2003-2011 Jasper Spaans