Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2591820ybt; Fri, 3 Jul 2020 13:10:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZyvgHC/xIgC5Tb8Ni3w7QXGhnzEhQ5JOIiwhY/YMl7Qp+v7Ae37cAlpiUMFMkiG8N6qZs X-Received: by 2002:a17:906:6dda:: with SMTP id j26mr34713753ejt.336.1593807016482; Fri, 03 Jul 2020 13:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593807016; cv=none; d=google.com; s=arc-20160816; b=b/IWrHnI71nl3lWvqIiGRvvVFoIsuiuT2jfIbzmZT5LITZN0A1nixIZmU56elbaMrc lAxJcpuzInMl8Dbvq1uh9hZH46NyKLhlzIPL9RxjZJva/24h/pAbvxgt0435GinHplNU r/ILnOCv9mqr1d5vbh0j7bdbTH3kFteJBH6QBxyl7y9ms2vhmgoVSUnKK5F+viECbTLW cSOBa/L6J/cp+rEXW/BZocycwVXaoLlduTT2B94gxspu/HcCwtcMHJ5lrEhJrXbZrAge mOPEus61IB7KyQvEsxolfCe7oZJW/GK21B7Yjtri50RwNW0hGNbVFNmsDzgsVHA4dasb IWgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=32NJCoPJ1LAKcnLbho5tjOXJbJthQBzYpGTkqpYZEQE=; b=pl0ROFE35x+66nclgL/D/xKJ4+hJs3hPf7MJmhFagoZCBm2iPxsIKMkSseA0+umQFE XOofLybLJgHEdUTmkUb6+7UWkNi6FgYPJwFXeibEfmRsQHLZlecK8rQMDcfW+BPNkj0N 1ceYhUXmXqKu78aiOX3RJdT4Ru5/D7bmQJpzAOwH5KEUktTQ8c2pXyuuO0w1mK/qljue Uafwi6qL0l1CKhDxbdNaxoBVoWNUkZwYTFcyWMW3jVJ1li4u+w0FYafhZZKdJePnoAzV E/uRa57IBnED/DJ1iUL6KCr2kNGacI77uhQRt5tPc2BA/F2BqyFeIJSGUDQtzvLmspBK nn1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=eNU4xHzN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si8650903eds.479.2020.07.03.13.09.48; Fri, 03 Jul 2020 13:10:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=eNU4xHzN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbgGCUJP (ORCPT + 99 others); Fri, 3 Jul 2020 16:09:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbgGCUJP (ORCPT ); Fri, 3 Jul 2020 16:09:15 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8C9DC061794 for ; Fri, 3 Jul 2020 13:09:14 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id f5so22437155ljj.10 for ; Fri, 03 Jul 2020 13:09:14 -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=NZbZVVKasVg6Azf+Gl9Kd9rUgs9l3OX+5r93rtjI/Ro1RICw+s8y1R/KNhVOFg/IDe 4uQgTdLlXoqBZLYoyubQz5yH3gyPXpZ0GGnoVJl7EA8tg7OlinKiD5y7q8Pcwxe+Naot JEnXlHOgjrIuIzXlwAu1XaZ9NgfSFNzfHFnuP+WfYg+zEgDXkD+zBGUfnQMydwWXYqs2 lN2EIld3XDppRt2E2lRwerzEQ7E0PMKzb7indAC32d9/Xd3GGn0grUZRsEuip+nw7hoX qTFEgutuS7wfH8pLh9WUueo9WdSrmLn7OEgR4GwIaaqwDTjNhR3WY4/hXXMQje9Z3Zmn zXMQ== X-Gm-Message-State: AOAM530MO8EtHyV2MtC4EkvLL9yfTQCh053Fo35BFBUXwSUPUfinkvkb GBV2OSpCNynMwmB++uM1xeANJWNQQBg= X-Received: by 2002:a2e:9a59:: with SMTP id k25mr22018630ljj.114.1593806952959; Fri, 03 Jul 2020 13:09:12 -0700 (PDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id g2sm5229532ljj.90.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-f175.google.com with SMTP id 9so38268980ljv.5 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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