Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532708
| From | Borislav Petkov <bp@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: AMD Bulldozer topology regression since 4.6 |
| Date | 2016-11-29 20:40 +0100 |
| Message-ID | <sIWpY-4eA-5@gated-at.bofh.it> (permalink) |
| References | <sIKI9-58W-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 29, 2016 at 08:03:15AM +0100, Brice Goglin wrote:
> This causes user-space tools (at least all that rely on hwloc for
> topology discovery) to think the processor has dual-threaded cores
> instead of dual-core compute-unit modules.
>
> The cause is likely this patch, which seems to assume both cores of a
> same compute-unit have the same ID, which is wrong?
Does that fix it?
Patch is against latest tip/master because we have some more changes in
that area.
---
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 4daad1e39352..a070d7b0a133 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -305,15 +305,7 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
/* get information required for multi-node processors */
if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
- u32 eax, ebx, ecx, edx;
-
- cpuid(0x8000001e, &eax, &ebx, &ecx, &edx);
- node_id = ecx & 7;
-
- /* get compute unit information */
- smp_num_siblings = ((ebx >> 8) & 3) + 1;
- c->x86_max_cores /= smp_num_siblings;
- c->cpu_core_id = ebx & 0xff;
+ node_id = cpuid_ecx(0x8000001e) & 7;
/*
* We may have multiple LLCs if L3 caches exist, so check if we
---
Just in case, I have one against Linus' master too:
---
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 1e81a37c034e..19f50a9d6b42 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -305,15 +305,7 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
/* get information required for multi-node processors */
if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
- u32 eax, ebx, ecx, edx;
-
- cpuid(0x8000001e, &eax, &ebx, &ecx, &edx);
- node_id = ecx & 7;
-
- /* get compute unit information */
- smp_num_siblings = ((ebx >> 8) & 3) + 1;
- c->x86_max_cores /= smp_num_siblings;
- c->cpu_core_id = ebx & 0xff;
+ node_id = cpuid_ecx(0x8000001e) & 7;
} else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) {
u64 value;
---
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
AMD Bulldozer topology regression since 4.6 Brice Goglin <Brice.Goglin@inria.fr> - 2016-11-29 08:10 +0100
Re: AMD Bulldozer topology regression since 4.6 Borislav Petkov <bp@suse.de> - 2016-11-29 20:40 +0100
Re: AMD Bulldozer topology regression since 4.6 Brice Goglin <Brice.Goglin@inria.fr> - 2016-11-29 22:10 +0100
Re: AMD Bulldozer topology regression since 4.6 Borislav Petkov <bp@suse.de> - 2016-11-29 22:20 +0100
csiph-web