This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21396] Use AVX2 memcpy/memset on Skylake server


https://sourceware.org/bugzilla/show_bug.cgi?id=21396

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.24/master has been updated
       via  a29331702f3b58a2f4afb051b219a7e0deb1f487 (commit)
       via  5f85ab28690a94355a0eaf75206cdf237fe6009d (commit)
      from  b2e8c40afcb83f9a6dbbb543ce0951b6c890d350 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a29331702f3b58a2f4afb051b219a7e0deb1f487

commit a29331702f3b58a2f4afb051b219a7e0deb1f487
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Apr 28 10:27:22 2017 -0700

    x86: Use AVX2 memcpy/memset on Skylake server [BZ #21396]

    On Skylake server, AVX512 load/store instructions in memcpy/memset may
    lead to lower CPU turbo frequency in certain situations.  Use of AVX2
    in memcpy/memset has been observed to have improved overall performance
    in many workloads due to the higher frequency.

    Since AVX512ER is unique to Xeon Phi, this patch sets Prefer_No_AVX512
    if AVX512ER isn't available so that AVX2 versions of memcpy/memset are
    used on Skylake server.

        [BZ #21396]
        * sysdeps/x86/cpu-features.c (init_cpu_features): Set
        Prefer_No_AVX512 if AVX512ER isn't available.
        * sysdeps/x86/cpu-features.h (bit_arch_Prefer_No_AVX512): New.
        (index_arch_Prefer_No_AVX512): Likewise.
        * sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Don't use
        AVX512 version if Prefer_No_AVX512 is set.
        * sysdeps/x86_64/multiarch/memcpy_chk.S (__memcpy_chk):
        Likewise.
        * sysdeps/x86_64/multiarch/memmove.S (__libc_memmove): Likewise.
        * sysdeps/x86_64/multiarch/memmove_chk.S (__memmove_chk):
        Likewise.
        * sysdeps/x86_64/multiarch/mempcpy.S (__mempcpy): Likewise.
        * sysdeps/x86_64/multiarch/mempcpy_chk.S (__mempcpy_chk):
        Likewise.
        * sysdeps/x86_64/multiarch/memset.S (memset): Likewise.
        * sysdeps/x86_64/multiarch/memset_chk.S (__memset_chk):
        Likewise.

    (cherry picked from commit 4cb334c4d6249686653137ec273d081371b3672d)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5f85ab28690a94355a0eaf75206cdf237fe6009d

commit 5f85ab28690a94355a0eaf75206cdf237fe6009d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Apr 28 10:26:58 2017 -0700

    x86: Set Prefer_No_VZEROUPPER if AVX512ER is available

    AVX512ER won't be implemented in any Xeon processors and will be in
    all Xeon Phi processors.  Don't check CPU model number when setting
    Prefer_No_VZEROUPPER for Xeon Phi.  Instead, set Prefer_No_VZEROUPPER
    if AVX512ER is available.  It works with current and future Xeon Phi
    and non-Xeon Phi processors.

        * sysdeps/x86/cpu-features.c (init_cpu_features): Set
        Prefer_No_VZEROUPPER if AVX512ER is available.
        * sysdeps/x86/cpu-features.h
        (bit_cpu_AVX512PF): New.
        (bit_cpu_AVX512ER): Likewise.
        (bit_cpu_AVX512CD): Likewise.
        (bit_cpu_AVX512BW): Likewise.
        (bit_cpu_AVX512VL): Likewise.
        (index_cpu_AVX512PF): Likewise.
        (index_cpu_AVX512ER): Likewise.
        (index_cpu_AVX512CD): Likewise.
        (index_cpu_AVX512BW): Likewise.
        (index_cpu_AVX512VL): Likewise.
        (reg_AVX512PF): Likewise.
        (reg_AVX512ER): Likewise.
        (reg_AVX512CD): Likewise.
        (reg_AVX512BW): Likewise.
        (reg_AVX512VL): Likewise.

    (cherry picked from commit 1c53cb49de6d82d9469ccbd5aa0c55924502bd8b)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                              |   42 ++++++++++++++++++++++++++++++++
 sysdeps/x86/cpu-features.c             |   12 +++++++-
 sysdeps/x86/cpu-features.h             |   18 +++++++++++++
 sysdeps/x86_64/multiarch/memcpy.S      |    2 +
 sysdeps/x86_64/multiarch/memcpy_chk.S  |    2 +
 sysdeps/x86_64/multiarch/memmove.S     |    2 +
 sysdeps/x86_64/multiarch/memmove_chk.S |    2 +
 sysdeps/x86_64/multiarch/mempcpy.S     |    2 +
 sysdeps/x86_64/multiarch/mempcpy_chk.S |    2 +
 sysdeps/x86_64/multiarch/memset.S      |    2 +
 sysdeps/x86_64/multiarch/memset_chk.S  |    2 +
 11 files changed, 86 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]