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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUWfgu2aHRTJZWSd6hjk58YkmU7ey4iRk=8=wVf5twSMAA@mail.gmail.com>
Date:   Fri, 22 Jan 2021 02:43:22 +0100
From:   Sedat Dilek <sedat.dilek@...il.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Bill Wendling <morbo@...gle.com>, Jonathan Corbet <corbet@....net>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Linux Doc Mailing List <linux-doc@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Clang-Built-Linux ML <clang-built-linux@...glegroups.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Nathan Chancellor <natechancellor@...il.com>,
        Sami Tolvanen <samitolvanen@...gle.com>
Subject: Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

On Fri, Jan 22, 2021 at 2:34 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Wed, Jan 20, 2021 at 6:21 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >
> > Hi,
> >
> > When I looked through the code I wondered why we do not add a
> > "CONFIG_PGO_CLANG_PROFDATA" which can be helpful when doing the PGO
> > rebuild with a vmlinux.profdata.
> >
> > This introduces a "PGO_PROFDATA" to turn on/off to pass
> > "-fprofile-use=vmlinux.profdata" (see CFLAGS_PGO_CLANG_PROFDATA in
> > top-level Makefile).
> >
> > If we turn off via "PGO_PROFILE := n" in several Makefiles - we should
> > do the same and add "PGO_PROFDATA := n" to the same Makefiles?
> >
> > Please see the attached diff.
>
> This is a good idea; something that I brought up in initial code
> review (on github).  Would it be ok with you to land the core first,
> then follow up with this suggestion?
>
> Also, AutoFDO production builds are so incredibly similar to PGO
> builds that I could see a possible path forward:
> 1. land PGO upstream
> 2. adds docs for AutoFDO
> 3. consider a config for hardcoding the location of the profiling data
> so that we don't need to specify it at the command line invocation of
> make.
>

I made a v3 - with some small nits.
The idea was to do the "PGO-rebuild" handling a bit easier.

But as you say that can wait.

Some personal notes:

I will be very happy when people verify/confirm what's going on with
PGO-rebuild + LLVM_IAS=1.
As said GNU/AS and PGO-rebuild is fine.
( This seems to be independent of clang-12 or clang-11. )
( This seems to be independent of DWARF v4 or v5 enabled. )

The benefit here I saw was a reduction in build-time of 00:30 seen
from a total 04:30 when using a PGO-rebuilt Linux-kernel.
Approx. 10%?

This is not much compared to a ThinLTO + PGO optimized LLVM toolchain
whcih saved here 40% of build-time.

- Sedat -

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ