[lkml]   [2008]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] prepare kconfig inline optimization for all architectures
On Sun, Apr 27, 2008 at 11:11:27AM -0700, Linus Torvalds wrote:
> On Sun, 27 Apr 2008, Adrian Bunk wrote:
> >
> > What I want instead:
> > - we continue to force the compiler to always inline with "inline"
> > - we remove the inline's in .c files and make too big functions in
> > headers out-of-line
> Sure, I can agree with that as a mostly good goal, but you're still
> ignoring the fact that nobody should really expect the compiler to always
> do a good job at deciding high-level issues.
> For example, what's wrong with having "inline" on functions in .c files if
> the author thinks they are small enough? He's likely right. Considering
> past behaviour, he's quite often more right than the compiler.

Ingo's commit in your tree just broke this assumption.

And he justified breaking it with a 2.3% size decrease.

And after
- grep'ing for "inline" through drivers/
- remembering how driver authors use likely/unlikely
- remembering the practically non-existing quality criteria you set
for new drivers [1]
"He's likely right." is likely not right for the average driver author.

You might be smarter than gcc, but most kernel developers (including me)
are not.

> Linus


[1] you said you really wanted this driver merged in this state in 2.6.25:

grep -C4 volatile drivers/infiniband/hw/nes/nes_nic.c


"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

 \ /
  Last update: 2008-04-27 20:43    [W:0.066 / U:0.988 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site