On Fri, Jul 03, 2020 at 01:54:39PM +0800, Rong Chen wrote:
> > This commit should not cause regression.
> >
> > Probably the variation of performance is caused by test environment 
> > which you may want to investigate further to reduce false alarming.
> > Thanks!
> 
> Hi Yonghong,
> 
> It's a function align issue, the commit effects the align of functions 
> which causes a little regression,
> we force to set -falign-functions=32 in KBUILD_CFLAGS and the regression 
> is gone:
> 
> diff --git a/Makefile b/Makefile
> index 70def4907036c..9746afa4edc21 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -476,7 +476,7 @@ LINUXINCLUDE牋? := \
>  牋牋牋牋牋牋牋? $(USERINCLUDE)
> 
>  燢BUILD_AFLAGS牋 := -D__ASSEMBLY__ -fno-PIE
> -KBUILD_CFLAGS牋 := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
> +KBUILD_CFLAGS牋 := -Wall -Wundef -falign-functions=32 
> -Werror=strict-prototypes -Wno-trigraphs \
>  牋牋牋牋牋牋牋牋牋 -fno-strict-aliasing -fno-common -fshort-wchar 
> -fno-PIE \
>  牋牋牋牋牋牋牋牋牋 -Werror=implicit-function-declaration 
> -Werror=implicit-int \
>  牋牋牋牋牋牋牋牋牋 -Wno-format-security \
 
For these strange performance change cases caused by a seemingly
unrelated commit, we have used this function alignment patch to
explain some of them to be caused by re-arrange of text code
alignment [1][2]

So one bold thought is can we merge this option into mainline under
a kernel config option in 'kernel hacking' category, with which both
developers and 0day can filter out some cases to be related with text
alignment change more easily?

[1] [LKP][mm] fd4d9c7d0c: stress-ng.switch.ops_per_sec -30.5% regression
    https://lore.kernel.org/lkml/20200330011254.GA14393@feng-iot/ 
[2] [mm/hugetlb] c77c0a8ac4: will-it-scale.per_process_ops 15.9% improvement
    https://lore.kernel.org/lkml/20200114085637.GA29297@shao2-debian/
    (this patch is not used in the discussion, but we later used
    this patch to confirm it's a text alignment case)

Thanks,
Feng

Reply via email to