]> sourceware.org Git - glibc.git/commit
x86: Add `Avoid_STOSB` tunable to allow NT memset without ERMS
authorNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 14 Aug 2024 06:37:31 +0000 (14:37 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 15 Aug 2024 15:19:15 +0000 (08:19 -0700)
commitf446d90fe6605ac473aaa6cd17a1800e72dcc1a2
treea381ddf487e56995f35208f093ddacd49256da73
parentb93dddfaf440aa12f45d7c356f6ffe9f27d35577
x86: Add `Avoid_STOSB` tunable to allow NT memset without ERMS

The goal of this flag is to allow targets which don't prefer/have ERMS
to still access the non-temporal memset implementation.

There are 4 cases for tuning memset:
    1) `Avoid_STOSB && Avoid_Non_Temporal_Memset`
        - Memset with temporal stores
    2) `Avoid_STOSB && !Avoid_Non_Temporal_Memset`
        - Memset with temporal/non-temporal stores. Non-temporal path
          goes through `rep stosb` path. We accomplish this by setting
          `x86_rep_stosb_threshold` to
          `x86_memset_non_temporal_threshold`.
    3) `!Avoid_STOSB && Avoid_Non_Temporal_Memset`
        - Memset with temporal stores/`rep stosb`
    3) `!Avoid_STOSB && !Avoid_Non_Temporal_Memset`
        - Memset with temporal stores/`rep stosb`/non-temporal stores.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/x86/cpu-features.c
sysdeps/x86/cpu-tunables.c
sysdeps/x86/dl-cacheinfo.h
sysdeps/x86/include/cpu-features-preferred_feature_index_1.def
sysdeps/x86/tst-hwcap-tunables.c
sysdeps/x86_64/multiarch/ifunc-memset.h
This page took 0.036259 seconds and 5 git commands to generate.