public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org,
	Noah Goldstein <goldstein.w.n@gmail.com>,
	 Sajan Karumanchi <sajan.karumanchi@gmail.com>,
	bmerry@sarao.ac.za, pmallapp@amd.com
Subject: Re: [PATCH v3 2/3] x86: Do not prefer ERMS for memset on Zen3+
Date: Mon, 12 Feb 2024 07:56:29 -0800	[thread overview]
Message-ID: <CAMe9rOo+Z_5jXk4oWDDxp0-78cRSfYZVy7X8M4cN71PtJ0S0zQ@mail.gmail.com> (raw)
In-Reply-To: <20240208130840.533348-3-adhemerval.zanella@linaro.org>

On Thu, Feb 8, 2024 at 5:08 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> For AMD Zen3+ architecture, the performance of the vectorized loop is
> slightly better than ERMS.
>
> Checked on x86_64-linux-gnu on Zen3.
> ---
>  sysdeps/x86/dl-cacheinfo.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h
> index f34d12846c..5a98f70364 100644
> --- a/sysdeps/x86/dl-cacheinfo.h
> +++ b/sysdeps/x86/dl-cacheinfo.h
> @@ -1021,6 +1021,11 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
>       minimum value is fixed.  */
>    rep_stosb_threshold = TUNABLE_GET (x86_rep_stosb_threshold,
>                                      long int, NULL);
> +  if (cpu_features->basic.kind == arch_kind_amd
> +      && !TUNABLE_IS_INITIALIZED (x86_rep_stosb_threshold))
> +    /* For AMD Zen3+ architecture, the performance of the vectorized loop is
> +       slightly better than ERMS.  */
> +    rep_stosb_threshold = SIZE_MAX;
>
>    TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, SIZE_MAX);
>    TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, SIZE_MAX);
> --
> 2.34.1
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.

-- 
H.J.

  reply	other threads:[~2024-02-12 15:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 13:08 [PATCH v3 0/3] x86: Improve ERMS usage " Adhemerval Zanella
2024-02-08 13:08 ` [PATCH v3 1/3] x86: Fix Zen3/Zen4 ERMS selection (BZ 30994) Adhemerval Zanella
2024-02-12 15:56   ` H.J. Lu
2024-02-08 13:08 ` [PATCH v3 2/3] x86: Do not prefer ERMS for memset on Zen3+ Adhemerval Zanella
2024-02-12 15:56   ` H.J. Lu [this message]
2024-02-08 13:08 ` [PATCH v3 3/3] x86: Expand the comment on when REP STOSB is used on memset Adhemerval Zanella
2024-02-12 15:56   ` H.J. Lu
2024-03-25 15:15 ` [PATCH v3 0/3] x86: Improve ERMS usage on Zen3+ Florian Weimer
2024-03-25 15:19   ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMe9rOo+Z_5jXk4oWDDxp0-78cRSfYZVy7X8M4cN71PtJ0S0zQ@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=bmerry@sarao.ac.za \
    --cc=goldstein.w.n@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=pmallapp@amd.com \
    --cc=sajan.karumanchi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).