This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.21-236-ga3d9ab5
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 31 Mar 2015 20:18:56 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-236-ga3d9ab5
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, master has been updated
via a3d9ab5070b56b49aa91be2887fa5b118012b2cd (commit)
from 83569fb894050db7430047da2219ca50c68f882a (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3d9ab5070b56b49aa91be2887fa5b118012b2cd
commit a3d9ab5070b56b49aa91be2887fa5b118012b2cd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Mar 31 13:17:51 2015 -0700
Limit threads sharing L2 cache to 2 for SLM/KNL
Silvermont and Knights Landing have a modular system design with two cores
sharing an L2 cache. If more than 2 cores are detected to shared L2 cache,
it should be adjusted for Silvermont and Knights Landing.
[BZ #18185]
* sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Limit threads
sharing L2 cache to 2 for Silvermont/Knights Landing.
diff --git a/ChangeLog b/ChangeLog
index dd40484..3e8df42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
+ [BZ #18185]
+ * sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Limit threads
+ sharing L2 cache to 2 for Silvermont/Knights Landing.
+
+2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
+
[BZ #17711]
* config.make.in (have-protected-data): New.
* configure.ac: Check linker support for protected data symbol.
diff --git a/NEWS b/NEWS
index b66c1b1..d2651b3 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,7 @@ Version 2.22
17932, 17944, 17949, 17964, 17965, 17967, 17969, 17978, 17987, 17991,
17996, 17998, 17999, 18019, 18020, 18029, 18030, 18032, 18036, 18038,
18039, 18042, 18043, 18046, 18047, 18068, 18080, 18093, 18100, 18104,
- 18110, 18111, 18128, 18138.
+ 18110, 18111, 18128, 18138, 18185.
* A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors
for LD and GD on x86 and x86-64, has been implemented. You will need
diff --git a/sysdeps/x86_64/cacheinfo.c b/sysdeps/x86_64/cacheinfo.c
index f1cbf50..b99fb9a 100644
--- a/sysdeps/x86_64/cacheinfo.c
+++ b/sysdeps/x86_64/cacheinfo.c
@@ -585,6 +585,10 @@ init_cacheinfo (void)
__cpuid (1, eax, ebx_1, ecx, edx);
#endif
+ unsigned int family = (eax >> 8) & 0x0f;
+ unsigned int model = (eax >> 4) & 0x0f;
+ unsigned int extended_model = (eax >> 12) & 0xf0;
+
#ifndef DISABLE_PREFERRED_MEMORY_INSTRUCTION
/* Intel prefers SSSE3 instructions for memory/string routines
if they are available. */
@@ -647,6 +651,25 @@ init_cacheinfo (void)
}
}
threads += 1;
+ if (threads > 2 && level == 2 && family == 6)
+ {
+ model += extended_model;
+ switch (model)
+ {
+ case 0x57:
+ /* Knights Landing has L2 cache shared by 2 cores. */
+ case 0x37:
+ case 0x4a:
+ case 0x4d:
+ case 0x5a:
+ case 0x5d:
+ /* Silvermont has L2 cache shared by 2 cores. */
+ threads = 2;
+ break;
+ default:
+ break;
+ }
+ }
}
else
{
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
NEWS | 2 +-
sysdeps/x86_64/cacheinfo.c | 23 +++++++++++++++++++++++
3 files changed, 30 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources