From: Thomas Gleixner <tglx@linutronix.de>
To: Tim Teichmann <teichmanntim@outlook.de>
Cc: Christian Heusel <christian@heusel.eu>,
regressions@lists.linux.dev, x86@kernel.org,
stable@vger.kernel.org
Subject: Re: [REGRESSION][BISECTED] Scheduling errors with the AMD FX 8300 CPU
Date: Mon, 27 May 2024 19:17:38 +0200 [thread overview]
Message-ID: <87msobb2dp.ffs@tglx> (raw)
In-Reply-To: <PR3PR02MB6012EDF7EBA8045FBB03C434B3F02@PR3PR02MB6012.eurprd02.prod.outlook.com>
Tim!
On Mon, May 27 2024 at 18:36, Tim Teichmann wrote:
> Right here is the output of the
> Basic Leafs :
> ================
> 0x00000000: EAX=0x0000000d, EBX=0x68747541, ECX=0x444d4163, EDX=0x69746e65
> 0x00000001: EAX=0x00600f20, EBX=0x00080800, ECX=0x3e98320b, EDX=0x178bfbff
> 0x00000005: EAX=0x00000040, EBX=0x00000040, ECX=0x00000003, EDX=0x00000000
> 0x00000006: EAX=0x00000000, EBX=0x00000000, ECX=0x00000001, EDX=0x00000000
> 0x00000007: subleafs:
> 0: EAX=0x00000000, EBX=0x00000008, ECX=0x00000000, EDX=0x00000000
> 0x0000000d: subleafs:
> 0: EAX=0x00000007, EBX=0x00000340, ECX=0x000003c0, EDX=0x40000000
> 2: EAX=0x00000100, EBX=0x00000240, ECX=0x00000000, EDX=0x00000000
> Extended Leafs :
> ================
> 0x80000000: EAX=0x8000001e, EBX=0x68747541, ECX=0x444d4163, EDX=0x69746e65
> 0x80000001: EAX=0x00600f20, EBX=0x10000000, ECX=0x01eb3fff, EDX=0x2fd3fbff
> 0x80000002: EAX=0x20444d41, EBX=0x74285846, ECX=0x382d296d, EDX=0x20303033
> 0x80000003: EAX=0x68676945, EBX=0x6f432d74, ECX=0x50206572, EDX=0x65636f72
> 0x80000004: EAX=0x726f7373, EBX=0x20202020, ECX=0x20202020, EDX=0x00202020
> 0x80000005: EAX=0xff40ff18, EBX=0xff40ff30, ECX=0x10040140, EDX=0x40020140
> 0x80000006: EAX=0x64006400, EBX=0x64004200, ECX=0x08008140, EDX=0x0040c140
> 0x80000007: EAX=0x00000000, EBX=0x00000000, ECX=0x00000000, EDX=0x000007d9
> 0x80000008: EAX=0x00003030, EBX=0x00001000, ECX=0x00004007, EDX=0x00000000
> 0x8000000a: EAX=0x00000001, EBX=0x00010000, ECX=0x00000000, EDX=0x00001cff
> 0x80000019: EAX=0xf040f018, EBX=0x64006400, ECX=0x00000000, EDX=0x00000000
> 0x8000001a: EAX=0x00000003, EBX=0x00000000, ECX=0x00000000, EDX=0x00000000
> 0x8000001b: EAX=0x000000ff, EBX=0x00000000, ECX=0x00000000, EDX=0x00000000
> 0x8000001c: EAX=0x00000000, EBX=0x80032013, ECX=0x00010200, EDX=0x8000000f
> 0x8000001d: subleafs:
> 0: EAX=0x00000121, EBX=0x00c0003f, ECX=0x0000003f, EDX=0x00000000
> 1: EAX=0x00004122, EBX=0x0040003f, ECX=0x000001ff, EDX=0x00000000
> 2: EAX=0x00004143, EBX=0x03c0003f, ECX=0x000007ff, EDX=0x00000001
> 3: EAX=0x0001c163, EBX=0x0fc0003f, ECX=0x000007ff, EDX=0x00000001
> 0x8000001e: EAX=0x00000000, EBX=0x00000100, ECX=0x00000000, EDX=0x00000000
Duh. 0x8000001e claims that there are two SMT threads. The original code
only evaluates that part for family >= 0x17. I missed to forward that
condition.
Fix below.
Thanks,
tglx
---
diff --git a/arch/x86/kernel/cpu/topology_amd.c b/arch/x86/kernel/cpu/topology_amd.c
index d419deed6a48..ebf1cefb1cb2 100644
--- a/arch/x86/kernel/cpu/topology_amd.c
+++ b/arch/x86/kernel/cpu/topology_amd.c
@@ -84,9 +84,9 @@ static bool parse_8000_001e(struct topo_scan *tscan, bool has_topoext)
/*
* If leaf 0xb is available, then the domain shifts are set
- * already and nothing to do here.
+ * already and nothing to do here. Only valid for family >= 0x17.
*/
- if (!has_topoext) {
+ if (!has_topoext && c->x86 >= 0x17) {
/*
* Leaf 0x80000008 set the CORE domain shift already.
* Update the SMT domain, but do not propagate it.
next prev parent reply other threads:[~2024-05-27 17:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 21:23 [REGRESSION][BISECTED] Scheduling errors with the AMD FX 8300 CPU Christian Heusel
2024-05-24 22:24 ` Thomas Gleixner
2024-05-25 0:12 ` Christian Heusel
2024-05-27 10:06 ` Thomas Gleixner
2024-05-27 12:35 ` Tim Teichmann
2024-05-27 15:01 ` Thomas Gleixner
2024-05-27 16:36 ` Tim Teichmann
2024-05-27 17:17 ` Thomas Gleixner [this message]
2024-05-28 15:43 ` Tim Teichmann
2024-05-28 19:15 ` Thomas Gleixner
2024-05-28 19:17 ` Jens Axboe
2024-05-28 20:19 ` Niklas Cassel
2024-05-29 13:02 ` Tim Teichmann
2024-05-29 18:33 ` Niklas Cassel
2024-05-29 22:59 ` Tim Teichmann
2024-05-28 20:19 ` [PATCH] x86/topology/amd: Evaluate SMT in CPUID leaf 0x8000001e only on family 0x17 and greater Thomas Gleixner
2024-05-28 20:21 ` [PATCH Resend] " Thomas Gleixner
2024-05-29 9:25 ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
2024-05-30 14:06 ` tip-bot2 for Thomas Gleixner
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=87msobb2dp.ffs@tglx \
--to=tglx@linutronix.de \
--cc=christian@heusel.eu \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=teichmanntim@outlook.de \
--cc=x86@kernel.org \
/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 NNTP newsgroup(s).