Re: [PATCH] force inlining of spinlock ops

From: Ingo Molnar
Date: Tue May 12 2015 - 03:44:56 EST



* Denys Vlasenko <dvlasenk@xxxxxxxxxx> wrote:

> With both gcc 4.7.2 and 4.9.2, sometimes gcc mysteriously doesn't inline
> very small functions we expect to be inlined. In particular,
> with this config: http://busybox.net/~vda/kernel_config
> there are more than a thousand copies of tiny spinlock-related functions:

That's an x86-64 allyesconfig AFAICS, right?

It's not mysterious, but an effect of -Os plus allowing GCC to do
inlining heuristics:

CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_OPTIMIZE_INLINING=y

Does the problem go away if you unset of these config options?

Furtermore, what is the size win on x86 defconfig with these options
set? allyesconfig has all sorts of crazy stuff enabled while defconfig
on x86 tries to track typical distro configs.

Thanks,

Ingo
--
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/