[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAR0JxvKOEOE6-SvFWzAueZL0qb6XaANDud0pVa_Ew3NWg@mail.gmail.com>
Date: Mon, 25 Mar 2019 15:41:40 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: linux-arch <linux-arch@...r.kernel.org>,
linux-s390 <linux-s390@...r.kernel.org>,
Dave Hansen <dave@...1.net>, Arnd Bergmann <arnd@...db.de>,
Michael Ellerman <mpe@...erman.id.au>, X86 ML <x86@...nel.org>,
linux-mips@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Paul Burton <paul.burton@...s.com>,
Ingo Molnar <mingo@...hat.com>,
linux-mtd <linux-mtd@...ts.infradead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING
Hi Heiko,
On Thu, Mar 21, 2019 at 5:02 PM Heiko Carstens
<heiko.carstens@...ibm.com> wrote:
>
> On Wed, Mar 20, 2019 at 03:20:27PM +0900, Masahiro Yamada wrote:
> > Commit 60a3cdd06394 ("x86: add optimized inlining") introduced
> > CONFIG_OPTIMIZE_INLINING, but it has been available only for x86.
> >
> > The idea is obviously arch-agnostic although we need some code fixups.
> > This commit moves the config entry from arch/x86/Kconfig.debug to
> > lib/Kconfig.debug so that all architectures (except MIPS for now) can
> > benefit from it.
> >
> > At this moment, I added "depends on !MIPS" because fixing 0day bot reports
> > for MIPS was complex to me.
> >
> > I tested this patch on my arm/arm64 boards.
> >
> > This can make a huge difference in kernel image size especially when
> > CONFIG_OPTIMIZE_FOR_SIZE is enabled.
> >
> > For example, I got 3.5% smaller arm64 kernel image for v5.1-rc1.
> >
> > dec file
> > 18983424 arch/arm64/boot/Image.before
> > 18321920 arch/arm64/boot/Image.after
>
> Well, this will change, since now people (have to) start adding
> __always_inline annotations on all architectures, most likely until
> all have about the same amount of annotations like x86. This will
> reduce the benefit.
If people start to replace inline with __always_inline here and there,
yes, the difference will be reduced.
Perhaps, we might end up with fixing dozens of places or so,
but I guess we would still get benefit.
> Not sure if it's really a win that we get the inline vs
> __always_inline discussion now on all architectures.
This feature is not x86-specific.
I prefer "do it for all arches or don't do it at all"
instead of the half-baked state.
If we force inlining for the 'inline' marker
there is no point of having __always_inline.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists