On 10/21/20 11:40 AM, Christophe Leroy wrote: > > > Le 21/10/2020 à 17:19, Peter Zijlstra a écrit : >> On Wed, Oct 21, 2020 at 03:27:18PM +0200, Jakub Jelinek wrote: >>> Hi! >>> >>> Based on the GCC PR97445 discussions, I'd like to propose following change, >>> which should significantly decrease the amount of code in inline functions >>> that use ilog2, but as I'm already two decades out of the Linux kernel >>> development, I'd appreciate if some kernel developer could try that (all >>> I have done is check that it gives the same results as before) and if it >>> works submit it for inclusion into the kernel? >> >> I'll stick it in my queue and feed it to the robots. >> > > I did a mpc885_ads_defconfig build with your patch. That's far better, even better than with gcc 9 without the patch. > > I only have two instances of get_order() in vmlinux, one of it is used twice, the other is never user. > > With -Winline, the reason for not inlining is for both because "the call is unlikely and the code size would grow" > > Christophe Do we want a lib/test_log2.c test? Although Jakub says that he already verified that is gives the same results as the previous code. I ran a (new) lib/test_log2.ko before and after Jakub's patch and got the same results, although I am not claiming that it has an exhaustive set of tests in it. [it is attached] -- ~Randy