From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756132AbdIGVS2 (ORCPT ); Thu, 7 Sep 2017 17:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37262 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755812AbdIGVS0 (ORCPT ); Thu, 7 Sep 2017 17:18:26 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A6D5280473 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=prarit@redhat.com Subject: Re: [PATCH] x86/smpboot: Fix __max_logical_packages estimate To: linux-kernel@vger.kernel.org References: <1504722964-9170-1-git-send-email-prarit@redhat.com> Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Jean Delvare , Borislav Petkov , Andy Lutomirski , Tim Chen , Vitaly Kuznetsov , Michael Ellerman , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= From: Prarit Bhargava Message-ID: Date: Thu, 7 Sep 2017 17:18:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1504722964-9170-1-git-send-email-prarit@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 07 Sep 2017 21:18:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/06/2017 02:36 PM, Prarit Bhargava wrote: > A system booted with a small number of cores enabled per package > panics because the estimate of __max_logical_packages is too low. > This occurs when the total number of active cores across all packages > is less than the maximum core count for a single package. > > ie) On a 4 package system with 20 cores/package where only 4 cores > are enabled on each package, the value of __max_logical_packages is > calculated as DIV_ROUND_UP(16 / 20) = 1 and not 4. > > Improve the estimate of __max_logical_packages by comparing the current > estimate to the number of SMBIOS type 4 Processor Information structures. > If __max_logical_packages is still insufficient during boot use the largest > possible value of Package ID. If I move this calculation to native_smp_cpus_done() I can eliminate a chunk of code and use boot_cpu_data.booted_cores to get a correct value. I'll resubmit with a new patch. P.