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

From: Jamie Lokier
Date: Sun Jan 11 2009 - 20:57:32 EST


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.

In kernel it's a problem due to raw stack usage.

In userspace apps (where stack used is larger), inlining single-call
functions could, paradoxically, run slower due to increased stack
dcache pressure for some larger functions.

-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/