[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874jllq229.ffs@tglx>
Date: Sun, 30 Jul 2023 09:41:02 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: "Michael Kelley (LINUX)" <mikelley@...rosoft.com>,
LKML <linux-kernel@...r.kernel.org>
Cc: "x86@...nel.org" <x86@...nel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Dick Kennedy <dick.kennedy@...adcom.com>,
James Smart <james.smart@...adcom.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
Guenter Roeck <linux@...ck-us.net>,
"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
Jean Delvare <jdelvare@...e.com>,
Huang Rui <ray.huang@....com>, Juergen Gross <jgross@...e.com>,
Steve Wahl <steve.wahl@....com>,
Mike Travis <mike.travis@....com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Russ Anderson <russ.anderson@....com>
Subject: RE: [patch v2 28/38] x86/cpu: Provide an AMD/HYGON specific
topology parser
On Sun, Jul 30 2023 at 05:20, Michael Kelley wrote:
> From: Thomas Gleixner <tglx@...utronix.de> Sent: Friday, July 28, 2023 5:13 AM
>> + /*
>> + * If leaf 0xb is available, then SMT shift is set already. If not
>> + * take it from ecx.threads_per_cpu and use topo_update_dom() as
>
> "take it from ebx.threads_per_cu and use topology_update_dom() as"
>
>> + * topology_set_dom() would propagate and overwrite the already
>> + * propagated CORE level.
>> + */
>> + if (!has_0xb) {
>> + topology_update_dom(tscan, TOPO_SMT_DOMAIN, get_count_order(leaf.threads_per_cu),
>> + leaf.threads_per_cu);
>
> leaf.threads_per_cu needs to be (leaf.threads_per_cu + 1) above. If
> the core has two hyper-threads, the value of the threads_per_cu
> field returned by CPUID is "1".
>
> All my Hyper-V VMs on AMD processors were coming up with only
> one thread per core. The change fixes the problem.
You are right. Thanks for tracking that down!
tglx
Powered by blists - more mailing lists