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]
Date:   Wed, 27 May 2020 13:36:41 +0200
From:   Sedat Dilek <sedat.dilek@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Marco Elver <elver@...gle.com>, Will Deacon <will@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Borislav Petkov <bp@...en8.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Alexander Potapenko <glider@...gle.com>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        kasan-dev <kasan-dev@...glegroups.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH -tip] compiler_types.h: Optimize __unqual_scalar_typeof
 compilation time

On Wed, May 27, 2020 at 1:27 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Wed, May 27, 2020 at 12:33 PM Marco Elver <elver@...gle.com> wrote:
> >
> > If the compiler supports C11's _Generic, use it to speed up compilation
> > times of __unqual_scalar_typeof(). GCC version 4.9 or later and
> > all supported versions of Clang support the feature (the oldest
> > supported compiler that doesn't support _Generic is GCC 4.8, for which
> > we use the slower alternative).
> >
> > The non-_Generic variant relies on multiple expansions of
> > __pick_integer_type -> __pick_scalar_type -> __builtin_choose_expr,
> > which increases pre-processed code size, and can cause compile times to
> > increase in files with numerous expansions of READ_ONCE(), or other
> > users of __unqual_scalar_typeof().
> >
> > Summary of compile-time benchmarking done by Arnd Bergmann [1]:
> >
> >         <baseline normalized time>  clang-11   gcc-9
> >         this patch                      0.78    0.91
> >         ideal                           0.76    0.86
> >
> > [1] https://lkml.kernel.org/r/CAK8P3a3UYQeXhiufUevz=rwe09WM_vSTCd9W+KvJHJcOeQyWVA@mail.gmail.com
> >
> > Further compile-testing done with:
> >         gcc 4.8, 4.9, 5.5, 6.4, 7.5, 8.4;
> >         clang 9, 10.
> >
> > Reported-by: Arnd Bergmann <arnd@...db.de>
> > Signed-off-by: Marco Elver <elver@...gle.com>
>
> This gives us back 80% of the performance drop on clang, and 50%
> of the drop I saw with gcc, compared to current mainline.
>
> Tested-by: Arnd Bergmann <arnd@...db.de>
>

Hi Arnd,

with "mainline" you mean Linux-next aka Linux v5.8 - not v5.7?
I have not seen __unqual_scalar_typeof(x) in compiler_types.h in Linux v5.7.

Is there a speedup benefit also for Linux v5.7?
Which patches do I need?

Thanks.

Regards,
- Sedat -

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ