public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: H.J. Lu <hjl.tools@gmail.com>
Cc: libc-alpha@sourceware.org,
	Sajan Karumanchi <sajan.karumanchi@amd.com>,
	Premachandra Mallappa <premachandra.mallappa@amd.com>
Subject: [PATCH] x86: Restore processing of cache size tunables in init_cacheinfo
Date: Wed, 28 Oct 2020 16:11:56 +0100	[thread overview]
Message-ID: <87v9euv0zn.fsf@oldenburg2.str.redhat.com> (raw)

Fixes and partially reverts commit 59803e81f96b479c17f583b31eac44b5
("x86: Optimizing memcpy for AMD Zen architecture.").

---
 sysdeps/x86/cacheinfo.h | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/sysdeps/x86/cacheinfo.h b/sysdeps/x86/cacheinfo.h
index 1296c93b2b..0aec0e2875 100644
--- a/sysdeps/x86/cacheinfo.h
+++ b/sysdeps/x86/cacheinfo.h
@@ -354,11 +354,9 @@ init_cacheinfo (void)
       }
     }
 
+  /* Prefer cache size configure via tuning.  */
   if (cpu_features->data_cache_size != 0)
-    {
-      if (data == 0 || cpu_features->basic.kind != arch_kind_amd)
-        data = cpu_features->data_cache_size;
-    }
+    data = cpu_features->data_cache_size;
 
   if (data > 0)
     {
@@ -370,11 +368,9 @@ init_cacheinfo (void)
       __x86_data_cache_size = data;
     }
 
+  /* Prefer cache size configure via tuning.  */
   if (cpu_features->shared_cache_size != 0)
-    {
-      if (shared == 0 || cpu_features->basic.kind != arch_kind_amd)
-        shared = cpu_features->shared_cache_size;
-    }
+    shared = cpu_features->shared_cache_size;
 
   if (shared > 0)
     {

-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill


             reply	other threads:[~2020-10-28 15:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 15:11 Florian Weimer [this message]
2020-10-28 15:14 ` H.J. Lu
2020-10-30  6:46   ` Karumanchi, Sajan

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=87v9euv0zn.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=premachandra.mallappa@amd.com \
    --cc=sajan.karumanchi@amd.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).