[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201019083225.GN2672@gate.crashing.org>
Date: Mon, 19 Oct 2020 03:32:25 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Joel Stanley <joel@....id.au>, Arnd Bergmann <arnd@...db.de>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-arch@...r.kernel.org,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] asm-generic: Force inlining of get_order() to work around gcc10 poor decision
On Mon, Oct 19, 2020 at 07:50:41AM +0200, Christophe Leroy wrote:
> Le 19/10/2020 à 06:55, Joel Stanley a écrit :
> >>In the old days, marking a function 'static inline' was forcing
> >>GCC to inline, but since commit ac7c3e4ff401 ("compiler: enable
> >>CONFIG_OPTIMIZE_INLINING forcibly") GCC may decide to not inline
> >>a function.
> >>
> >>It looks like GCC 10 is taking poor decisions on this.
> >1952 bytes smaller with your patch applied. Did you raise this with
> >anyone from GCC?
>
> Yes I did, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97445
>
> For the time being, it's at a standstill.
The kernel should just use __always_inline if that is what it *wants*;
that is true here most likely. GCC could perhaps improve its heuristics
so that it no longer thinks these functions are often too big for
inlining (they *are* pretty big, but not after basic optimisations with
constant integer arguments).
Segher
Powered by blists - more mailing lists