From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753344AbcCUIX4 (ORCPT ); Mon, 21 Mar 2016 04:23:56 -0400 Received: from mail.skyhub.de ([78.46.96.112]:34833 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751861AbcCUIXp (ORCPT ); Mon, 21 Mar 2016 04:23:45 -0400 Date: Mon, 21 Mar 2016 09:23:41 +0100 From: Borislav Petkov To: Huang Rui Cc: Sherry Hurwitz , Peter Zijlstra , tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, aherrmann@suse.com, jencce.kernel@gmail.com, Gang Long Subject: Re: [PATCH 2/3] x86/topology: Fix AMD core count Message-ID: <20160321082340.GA15904@pd.tnic> References: <20160318150345.146716865@infradead.org> <20160318150538.551407299@infradead.org> <20160318164101.GG7817@pd.tnic> <20160321030744.GA26269@hr-amur2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160321030744.GA26269@hr-amur2> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 21, 2016 at 11:07:46AM +0800, Huang Rui wrote: > OK, we will find some fam15h, fam16h platforms to verify it. Please > wait for my feedback. > > But I am confused with c->x86_max_cores /= smp_num_siblings, what is > the real meaning of c->x86_max_cores here for AMD, the whole compute > unit numbers per socket? Yes, it is the cores and each core can contain two or more logical threads. In AMD speak, that's the compute unit count. We read it in detect_ht() from CPUID(1).EBX[23:16] which is LogicalProcessorCount, i.e., CPUID(8000_0008).ECX[NC] + 1, i.e., the number of cores. And "cores" in BKDG speak is the number of all cores in a processor which are distributed across compute units.... That's why we divide by the number of siblings, i.e., the number of cores in a CU, in AMD speak. I know, it is confusing but once we're fine with the nomenclature, it'll become as clear as day. :-) -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.