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

Ingo Molnar
2009-01-12T08:41:32Z

* Jamie Lokier <jamie@shareable.org> wrote:

> Ingo Molnar wrote:
> > If it's used once in a single .c file it should be inlined even if
> > it's large.
>
> As Linus has pointed out, because of GCC not sharing stack among
> different inlined functions, the above is surprisingly not true.

Yes, but note that this has no relevance to the specific case of
CONFIG_OPTIMIZE_INLINING: GCC can at most decide to inline _less_, not
more. I.e. under CONFIG_OPTIMIZE_INLINING we can only end up having less
stack sharing trouble.

Ingo