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=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 7690CC433E0 for ; Fri, 3 Jul 2020 19:26:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2DAE4208C7 for ; Fri, 3 Jul 2020 19:26:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DTezh7T9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DAE4208C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CDDA98D0097; Fri, 3 Jul 2020 15:26:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C67128D0030; Fri, 3 Jul 2020 15:26:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B07168D0097; Fri, 3 Jul 2020 15:26:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 97B198D0030 for ; Fri, 3 Jul 2020 15:26:56 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5D25345B3 for ; Fri, 3 Jul 2020 19:26:56 +0000 (UTC) X-FDA: 76997747232.29.verse27_411621f26e94 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 3412618086E21 for ; Fri, 3 Jul 2020 19:26:56 +0000 (UTC) X-HE-Tag: verse27_411621f26e94 X-Filterd-Recvd-Size: 5031 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Fri, 3 Jul 2020 19:26:55 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id o4so19107614lfi.7 for ; Fri, 03 Jul 2020 12:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TFEfiy66+qRWsLsntclApDgr6Ih073UgX0yhLBJbpPE=; b=DTezh7T9i7T1nJ9vxpuTWQ5Yw6f3b3R4iTKe2K6vZSF8fB7h/2T/6XyxWyoMfLNzYO enRFytmWltC1st1TdHBORE6GfESIFbeCeEsGE1/qDoMkox9GFe+ow5K4yznFWqDHAB0j p6GHV2uOUX+EmJgOC8vXj8z6gayEglapPbbFm/MnBCshl6mj0v1jz8D+AVLgD1B3FhfP RkKBHf0qs3b2l8ovtCb7HuixNn1GbD/J9ysMWvI3wanqVxA0LU5Rhg2wjo8ZKRRHLhyB tN0lOtmlR31lb6bsqtNCMBvqIP4O5K94ThMmKA9ioSj8/oD78kYtLNypTOMxYCLkaJID Uq9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TFEfiy66+qRWsLsntclApDgr6Ih073UgX0yhLBJbpPE=; b=EpQoa4hPTV5pUMaki8w0k/sF/CoLnrTOjfxYOZFwWtXl51RHyeJk3Y6ZR40WDrVysg bo7TY0ga7BBokOuN6cComPN8p2rCyW+kQAaJ8yGWbQGWiKgpl774eEJW22TKyHx8tYKi ieWE1h8Lu9K6EoZrjGm6Kjp7Yt71wIZZmIhOXsNQ688N7ZGyLuXrdrCWd0mFRzC8lCEw oaUxI2PnllJkDqh7nhCXR2Hb5UILMSlQIAmNpLQ/DJ/gEBpiB8Cmg6Q50QQcURAKGlIW kyKZOZCCSK9vMC90RdZ7Wf1f6V3pWtOYcMHKHRiMHSjqMpPzfhYc7z6S45Ft/9yw81QD VRaQ== X-Gm-Message-State: AOAM5307ws5uYGNXkP026a4GceA1M4W0fA+RB6rlgeOpNBt9op68p4tu BnQJLi77c1LZX+1Krp/Fdjw= X-Google-Smtp-Source: ABdhPJxZiKFIICmpLaQFVTOj7TfuIfYukFzNM377zLlXwPShBXpQXy70R20rrZ0fLXxyhNYckk4JsA== X-Received: by 2002:a19:4247:: with SMTP id p68mr22908812lfa.22.1593804414237; Fri, 03 Jul 2020 12:26:54 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id d6sm4418606lja.77.2020.07.03.12.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 12:26:53 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Fri, 3 Jul 2020 21:26:51 +0200 To: Peter Zijlstra Cc: Uladzislau Rezki , 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: <20200703192651.GA5207@pc636> References: <20200703155749.GA6255@pc636> <20200703165627.GG4781@hirez.programming.kicks-ass.net> <20200703170941.GA4372@pc636> <20200703173814.GZ4800@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200703173814.GZ4800@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 3412618086E21 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:38:14PM +0200, Peter Zijlstra wrote: > 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. > Yes, i see that such information is propagated by the BIOS to the kernel, at least for x86 systems. Thad sad if i have single socket system then we do not have any physical hotplug ability, thus there is no need in over-provisioning. Agree that it can be hard to fix, since all that depends on ACPI interface. Like you stated in another mail. -- Vlad Rezki