Re: [PATCH] x86: force inlining of atomic ops

From: Ingo Molnar
Date: Tue May 12 2015 - 05:23:07 EST



* Hagen Paul Pfeifer <hagen@xxxxxxxx> wrote:

> * Denys Vlasenko | 2015-05-08 12:26:02 [+0200]:
>
> [snip]
> >With both gcc 4.7.2 and 4.9.2, sometimes gcc mysteriously doesn't inline
> >This patch fixes this for x86 atomic ops via s/inline/__always_inline/.
> >This decreases allyesconfig kernel by about 25k:
> >
> > text data bss dec hex filename
> >82399481 22255416 20627456 125282353 777a831 vmlinux.before
> >82375570 22255544 20627456 125258570 7774b4a vmlinux
>
> atomic_inc, atomic_sub, atomic_add, atomic_sub_and_test, atomic_dec,
> atomic_dec_and_test, atomic_add_return, __atomic_add_unless, atomic64_add,
> atomic64_inc, atomic64_dec, atomic64_add_return
>
> are already annotated with __always_inline. This patch will lead to merge
> conflicts someone, Ingo?

Yeah, I resolved it silently by dropping the bits that were already
annotated as always-inline.

So we have two patches in tip:x86/asm:

2a4e90b18c25 x86: Force inlining of atomic ops
3462bd2adead x86/asm: Always inline atomics

that DTRT. Hopefully.

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/