Re: [PATCH] force inlining of spinlock ops

2015-05-15 Thread Heiko Carstens
On Wed, May 13, 2015 at 04:09:18PM +0200, Denys Vlasenko wrote: > On 05/13/2015 12:43 PM, Ingo Molnar wrote: > > We only know that the net effect is +70 bytes. Does that come out of: > > > > - large fluctuations such as -1000-1000+1000+1070, which happens to > >net out into a small net numbe

Re: [PATCH] force inlining of spinlock ops

2015-05-13 Thread Denys Vlasenko
On 05/13/2015 12:43 PM, Ingo Molnar wrote: > > * Denys Vlasenko wrote: > >> On 05/13/2015 12:17 PM, Ingo Molnar wrote: > In any case, the interesting measurement would not be -Os comparisons > (which causes GCC to be too crazy), but to see the size effect of your > _patch_ that alw

Re: [PATCH] force inlining of spinlock ops

2015-05-13 Thread Ingo Molnar
* Denys Vlasenko wrote: > On 05/13/2015 12:17 PM, Ingo Molnar wrote: > >>> In any case, the interesting measurement would not be -Os comparisons > >>> (which causes GCC to be too crazy), but to see the size effect of your > >>> _patch_ that always-inlines spinlock ops, on plain defconfig and o

Re: [PATCH] force inlining of spinlock ops

2015-05-13 Thread Denys Vlasenko
On 05/13/2015 12:17 PM, Ingo Molnar wrote: >>> In any case, the interesting measurement would not be -Os comparisons >>> (which causes GCC to be too crazy), but to see the size effect of your >>> _patch_ that always-inlines spinlock ops, on plain defconfig and on >>> defconfig-Os. >> >> Here it

Re: [PATCH] force inlining of spinlock ops

2015-05-13 Thread Ingo Molnar
* Denys Vlasenko wrote: > On 05/12/2015 01:43 PM, Ingo Molnar wrote: > >>> Furtermore, what is the size win on x86 defconfig with these options > >>> set? > >> > >> CONFIG_OPTIMIZE_INLINING=y is in defconfig. > >> > >> Size difference for CC_OPTIMIZE_FOR_SIZE: > >> > >> textdata bss

Re: [PATCH] force inlining of spinlock ops

2015-05-12 Thread Denys Vlasenko
On 05/12/2015 01:43 PM, Ingo Molnar wrote: >>> Furtermore, what is the size win on x86 defconfig with these options >>> set? >> >> CONFIG_OPTIMIZE_INLINING=y is in defconfig. >> >> Size difference for CC_OPTIMIZE_FOR_SIZE: >> >> textdata bss dechex filename >> 12335864 1746152

Re: [PATCH] force inlining of spinlock ops

2015-05-12 Thread Ingo Molnar
* Denys Vlasenko wrote: > On 05/12/2015 09:44 AM, Ingo Molnar wrote: > > > > * Denys Vlasenko 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/~v

Re: [PATCH] force inlining of spinlock ops

2015-05-12 Thread Denys Vlasenko
On 05/12/2015 09:44 AM, Ingo Molnar wrote: > > * Denys Vlasenko 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

Re: [PATCH] force inlining of spinlock ops

2015-05-12 Thread Ingo Molnar
* Denys Vlasenko wrote: > > Also, the inline_for_broken_gcc definition can be made dependent > > on particular gcc versions, which will allow us to easily keep an > > eye on the behaviour of later gcc versions. > > I've seen it on gcc-4.7.2 and gcc-4.9.2, so this behavior is not > limited to

Re: [PATCH] force inlining of spinlock ops

2015-05-12 Thread Denys Vlasenko
On 05/12/2015 12:19 AM, Andrew Morton wrote: > On Mon, 11 May 2015 19:57:22 +0200 Denys Vlasenko 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

Re: [PATCH] force inlining of spinlock ops

2015-05-12 Thread Hagen Paul Pfeifer
* Andrew Morton | 2015-05-11 15:19:13 [-0700]: >Presumably Hagen didn't see the issue with spinlock functions. I >wonder why not. I think it is a compiler version thing. Not sure why I didn't see it. >I suppose we should get both these consolidated into a coherent whole. +1 (let wait for a mom

Re: [PATCH] force inlining of spinlock ops

2015-05-12 Thread Ingo Molnar
* Denys Vlasenko 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:

Re: [PATCH] force inlining of spinlock ops

2015-05-11 Thread Andrew Morton
On Mon, 11 May 2015 19:57:22 +0200 Denys Vlasenko 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 t

Re: [PATCH] force inlining of spinlock ops

2015-05-11 Thread Josh Triplett
On Mon, May 11, 2015 at 07:57:22PM +0200, Denys Vlasenko 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