From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08985C433E1 for ; Fri, 3 Jul 2020 17:38:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A91BD2084C for ; Fri, 3 Jul 2020 17:38:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="TENBVCQQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A91BD2084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0352E8D0074; Fri, 3 Jul 2020 13:38:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F27CA6B000E; Fri, 3 Jul 2020 13:38:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E3D378D0074; Fri, 3 Jul 2020 13:38:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id CECEF6B000C for ; Fri, 3 Jul 2020 13:38:22 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9663A180AD804 for ; Fri, 3 Jul 2020 17:38:22 +0000 (UTC) X-FDA: 76997473644.14.knot64_420081126e93 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 6CA0418229837 for ; Fri, 3 Jul 2020 17:38:22 +0000 (UTC) X-HE-Tag: knot64_420081126e93 X-Filterd-Recvd-Size: 3524 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Fri, 3 Jul 2020 17:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7zBZdw0QR2xfUPWBNQtxUbIiIrWFdv5YEeUMRjjrapc=; b=TENBVCQQRI54fD+psbQeLLNlsh GhgVFcg5FbiTISM7Xuog1ddJVpIgCYZbmcFPXbNnKE6iVANKMtXytuHbz4560E342/HYbuNgH4QfR 7Rq4VRIqRQ8aJN6i0MlwodA56iTubtD0SozAOwXTsYeAfzuEtbUJLWjS639gFxdj3/hdi1+C4vctb mPNOTim5jElQLayTQQOu/sIkX8sXGiGvA5tV2sIOMW6nBrcVcM/dUNdujb9wqiKMG1Gozp6geHA3h X0xllgFuf2Vg59KbEVScSQJZSEgMGyIZRQUcXOaGSbn5qWDac48iCisp99iBDZ+X96xv8NIxx9rfP l5SMbJqw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrPdf-0001Nq-Ej; Fri, 03 Jul 2020 17:38:15 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 40EEA304BAE; Fri, 3 Jul 2020 19:38:14 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2EA862217205D; Fri, 3 Jul 2020 19:38:14 +0200 (CEST) Date: Fri, 3 Jul 2020 19:38:14 +0200 From: Peter Zijlstra To: Uladzislau Rezki Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Linus Torvalds , GregKroah-Hartmangregkh@linuxfoundation.org Subject: Re: nr_cpu_ids vs AMD 3970x(32 physical CPUs) Message-ID: <20200703173814.GZ4800@hirez.programming.kicks-ass.net> References: <20200703155749.GA6255@pc636> <20200703165627.GG4781@hirez.programming.kicks-ass.net> <20200703170941.GA4372@pc636> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200703170941.GA4372@pc636> X-Rspamd-Queue-Id: 6CA0418229837 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jul 03, 2020 at 07:09:41PM +0200, Uladzislau Rezki wrote: > On Fri, Jul 03, 2020 at 06:56:27PM +0200, Peter Zijlstra wrote: > > On Fri, Jul 03, 2020 at 05:57:49PM +0200, Uladzislau Rezki wrote: > > > Hello, folk. > > > > > > I have a system based on AMD 3970x CPUs. It has 32 physical cores > > > and 64 threads. It seems that "nr_cpu_ids" variable is not correctly > > > set on latest 5.8-rc3 kernel. Please have a look below on dmesg output: > > > > > > > > > urezki@pc638:~$ sudo dmesg | grep 128 > > > [ 0.000000] IOAPIC[0]: apic_id 128, version 33, address 0xfec00000, GSI 0-23 > > > [ 0.000000] smpboot: Allowing 128 CPUs, 64 hotplug CPUs > > > > This is your BIOS saying it needs 128 ids, 64 of which are 'empty'. > > > > I have a box like that as well, if it bothers you boot with: > > "possible_cpus=64" or something. > > > OK, i got it. I thought that "cpu_possible_mask" strictly follows > the rule: the number of CPUs in a system that physically are present. Nah, it's based on ACPI (SRAT IIRC) tables. The case of over-provisioning is useful for systems that support physical hotplug, but I've seen boards without that capability do it too. Just chalk it up to the foibles of BIOS.