lkml.org 
[lkml]   [2015]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] force inlining of spinlock ops

* Denys Vlasenko <dvlasenk@redhat.com> 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:
> >>
> >> text data bss dec hex filename
> >> 12335864 1746152 1081344 15163360 e75fe0 vmlinux.CC_OPTIMIZE_FOR_SIZE=y
> >> 10373764 1684200 1077248 13135212 c86d6c vmlinux.CC_OPTIMIZE_FOR_SIZE=n
> >>
> >> Decrease by about 19%.
> >
> > I suspect the 'filename' field wants to be flipped?
>
> Yes.
>
> > 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 is:
>
> text data bss dec hex filename
> 12335864 1746152 1081344 15163360 e75fe0 vmlinuxO2.before
> 12335930 1746152 1081344 15163426 e76022 vmlinux

Hm, that's a (small) size increase on O2.

That might be a net positive though: because now we've eliminated
quite a few function calls. Do we know which individual functions
bloat and which debloat?

> text data bss dec hex filename
> 10373764 1684200 1077248 13135212 c86d6c vmlinuxOs.before
> 10363621 1684200 1077248 13125069 c845cd vmlinux

A decrease - which gets exploded on allyesconfig.

So as long as the -O2 case does not get hurt we can do -Os fixes.

I think this needs a bit more work to ensure that the O2 case is a net
win.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-05-13 12:41    [W:0.131 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site