From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752894AbcCUIXF (ORCPT ); Mon, 21 Mar 2016 04:23:05 -0400 Received: from [198.137.202.9] ([198.137.202.9]:57934 "EHLO bombadil.infradead.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751623AbcCUIW4 (ORCPT ); Mon, 21 Mar 2016 04:22:56 -0400 Date: Mon, 21 Mar 2016 09:21:29 +0100 From: Peter Zijlstra To: Huang Rui Cc: Borislav Petkov , Sherry Hurwitz , 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: <20160321082129.GP6344@twins.programming.kicks-ass.net> 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=us-ascii Content-Disposition: inline In-Reply-To: <20160321030744.GA26269@hr-amur2> User-Agent: Mutt/1.5.21 (2012-12-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: > > > The issue is that Linux assumes: > > > > > > nr_logical_cpus = nr_cores * nr_siblings > > > > > > But AMD reports its CU unit as 2 cores, but then sets num_smp_siblings > > > to 2 as well. > 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, with the whole Compute Unit being the Core, each logical CPU becomes a Thread. This is the direct consequence of using the SMT topology to model the CU thing.