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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 73454C433E0 for ; Fri, 3 Jul 2020 20:09:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 05E7F208FE for ; Fri, 3 Jul 2020 20:09:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="eNU4xHzN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05E7F208FE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3F4EF8D0060; Fri, 3 Jul 2020 16:09:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A67B8D0030; Fri, 3 Jul 2020 16:09:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 295498D0060; Fri, 3 Jul 2020 16:09:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 114618D0030 for ; Fri, 3 Jul 2020 16:09:17 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6F4C4824556B for ; Fri, 3 Jul 2020 20:09:16 +0000 (UTC) X-FDA: 76997853912.22.drink33_611562626e94 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 4280018038E60 for ; Fri, 3 Jul 2020 20:09:16 +0000 (UTC) X-HE-Tag: drink33_611562626e94 X-Filterd-Recvd-Size: 4194 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 3 Jul 2020 20:09:15 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id y18so19135619lfh.11 for ; Fri, 03 Jul 2020 13:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=32NJCoPJ1LAKcnLbho5tjOXJbJthQBzYpGTkqpYZEQE=; b=eNU4xHzNwEfW77EIM2wKYJg3eybE7Nh7EyOIpR4XOg9JVMHJGOM9J2GMb29dLLCC19 eCwMpT6ZQ/7wOkeMhKW8qMHCpge4Y6/MuMloZujBASUUaO8qoDnPo1CoPF4mEuogr81t It5p0dNPsnZGDGAqvdYQ6PXZ4VW3E0m2F/Uw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=32NJCoPJ1LAKcnLbho5tjOXJbJthQBzYpGTkqpYZEQE=; b=tCvIinTDT5X6occD0lZS3fAsnAAKNg9b+ARDrcU9J7Y8M6p2d7xYXN1AMhaXRWFahw OpZkYSYzB0u+Wq8iMutJjG/aH8pI0IIPdPgebvnQOVdR88hJR9z9vbWodWNjis9frM/W nF2cUNON6H8L5KZuqdh3V8704S4gLElWIoDzVebwJdG+Z83HDIqIsfRnKyVnwF1E5FdR UkQs2eCiNLtCbguvAToX8rE30AZYkdeUX9wJzyhxGLTl8tQWmqID3M+eMMfRRchPGQPd 4zYXZSWjfDjpLenyEHCpiKegkuSvji1Q/43iqqqxikE/Kwm7YXr+cPl6FesYTj+c+Co9 dv+Q== X-Gm-Message-State: AOAM533cy9WBV7LP3zeeS4erynLZEtb6ZH0hEeloSy4QYNSHa4QmslK6 b2pXPoLJQY9CSuUQy8YbQ1eOxrAwtYQ= X-Google-Smtp-Source: ABdhPJxgJol8gFJZOR0nqS2vPZ/rXoZwels5lf4H00uP4/BT92jxoXixv/b7QVHHKuqWGm4AuzucJQ== X-Received: by 2002:a19:c194:: with SMTP id r142mr22622661lff.87.1593806952922; Fri, 03 Jul 2020 13:09:12 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id f24sm4423268ljk.125.2020.07.03.13.09.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 13:09:12 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id h19so38316736ljg.13 for ; Fri, 03 Jul 2020 13:09:11 -0700 (PDT) X-Received: by 2002:a2e:999a:: with SMTP id w26mr15335747lji.371.1593806951543; Fri, 03 Jul 2020 13:09:11 -0700 (PDT) MIME-Version: 1.0 References: <20200703155749.GA6255@pc636> <8a2a55e6-6087-e4bf-3d35-ed4b4c216369@sony.com> <20200703192807.GB5207@pc636> In-Reply-To: <20200703192807.GB5207@pc636> From: Linus Torvalds Date: Fri, 3 Jul 2020 13:08:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: nr_cpu_ids vs AMD 3970x(32 physical CPUs) To: Uladzislau Rezki Cc: peter enderborg , Linux Kernel Mailing List , Linux-MM , Andrew Morton , GregKroah-Hartmangregkh@linuxfoundation.org, Peter Zijlstra Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4280018038E60 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 3, 2020 at 12:28 PM Uladzislau Rezki wrote: > > I have MSI TRX40 with latest BIOS. I think it's just that the BIOS is set for the max possible, in case you'd have a 3990X. I compile my kernel with CONFIG_NR_CPUS's set to 64. That works around the issue. Lots of distros seem to set CONFIG_MAXSMP to true, which I guess is the most generic thing to do, but the problem with that is not just the silly problem with the BIOS, but it also means that the kernel does dynamic allocation for cpumasks even if you _don't_ have that problem, because at compile-time you don't know how big the cpumask will be. With CONFIG_NR_CPUS's set to 64, the kernel will just use a "unsigned long" on the stack (and in various data structures) and be done with it, and not do unnecessary dynamic allocations. Linus