Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning

Andi Kleen
2009-01-11T18:13:07Z

On Sun, Jan 11, 2009 at 12:26:41PM +0000, David Woodhouse wrote:
> - Unconditionally have 'inline' meaning 'always_inline'. If we say it,
> we should mean it.
>
> - Resist the temptation to use -fno-inline-functions. Allow GCC to
> inline other things if it wants to.

The proposal was to use -fno-inline-functions-called-once (but
the resulting numbers were not promising)

We've never allowed gcc to inline any other functions not marked
inline explicitely because that's not included in -O2.

> - Reduce the number of unnecessary 'inline' markers, and have a policy
> that the use of 'inline' should be accompanied by either a GCC PR#
> or an explanation of why we couldn't reasonably have expected GCC to
> get this particular case right.
>
> - Have a similar policy of PR# or explanation for 'uninline' too.
>
> I don't think we should just give up on GCC ever getting it right. That
> way lies madness. As we've often found in the past.

It sounds like you're advocating to set -O3/-finline-functions
by default. Not sure that's a good idea.

-Andi

--
ak@linux.intel.com