Re: [PATCH] asm-generic: Force inlining of get_order() to work around gcc10 poor decision

2020-10-19 Thread Segher Boessenkool
On Mon, Oct 19, 2020 at 10:54:40AM +0200, Christophe Leroy wrote: > Le 19/10/2020 à 10:32, Segher Boessenkool a écrit : > >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

Re: [PATCH] asm-generic: Force inlining of get_order() to work around gcc10 poor decision

2020-10-19 Thread Christophe Leroy
Le 19/10/2020 à 10:32, Segher Boessenkool a écrit : 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

Re: [PATCH] asm-generic: Force inlining of get_order() to work around gcc10 poor decision

2020-10-19 Thread Segher Boessenkool
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

Re: [PATCH] asm-generic: Force inlining of get_order() to work around gcc10 poor decision

2020-10-18 Thread Christophe Leroy
Le 19/10/2020 à 06:55, Joel Stanley a écrit : On Sat, 17 Oct 2020 at 15:55, Christophe Leroy wrote: When building mpc885_ads_defconfig with gcc 10.1, the function get_order() appears 50 times in vmlinux: [linux]# ppc-linux-objdump -x vmlinux | grep get_order | wc -l 50 [linux]# size

Re: [PATCH] asm-generic: Force inlining of get_order() to work around gcc10 poor decision

2020-10-18 Thread Joel Stanley
On Sat, 17 Oct 2020 at 15:55, Christophe Leroy wrote: > > When building mpc885_ads_defconfig with gcc 10.1, > the function get_order() appears 50 times in vmlinux: > > [linux]# ppc-linux-objdump -x vmlinux | grep get_order | wc -l > 50 > > [linux]# size vmlinux >textdata bss dec

[PATCH] asm-generic: Force inlining of get_order() to work around gcc10 poor decision

2020-10-17 Thread Christophe Leroy
When building mpc885_ads_defconfig with gcc 10.1, the function get_order() appears 50 times in vmlinux: [linux]# ppc-linux-objdump -x vmlinux | grep get_order | wc -l 50 [linux]# size vmlinux textdata bss dec hex filename 3842620 675624 135160 4653404 47015c vmlinux In the