lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 13 Jul 2020 17:54:43 +0800
From:   Feng Tang <feng.tang@...el.com>
To:     Rong Chen <rong.a.chen@...el.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Yonghong Song <yhs@...com>, Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andriin@...com>,
        Martin KaFai Lau <kafai@...com>,
        LKML <linux-kernel@...r.kernel.org>,
        "lkp@...ts.01.org" <lkp@...ts.01.org>
Subject: Re: [LKP] Re: [bpf] af7ec13833: will-it-scale.per_process_ops -2.5%
 regression

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ