Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2507391ybt; Fri, 3 Jul 2020 10:39:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMqUrPERjZWP4XGb+8V/rEZ5T1VEX/wrki7HX+Vpni9UKfs+rDsSEyVZm25TgqyCv+NeEy X-Received: by 2002:a17:906:7d90:: with SMTP id v16mr7657836ejo.27.1593797964755; Fri, 03 Jul 2020 10:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593797964; cv=none; d=google.com; s=arc-20160816; b=RhrRawdGyviKJw+LzodJEHb/ExeKuxQHSuQ6fjji72y8IK8pLZQYXt3R4z/PQ0zBJu Q9aHcjgU68Bl8NeUeP/eDA1Vhg4hA797VXIlnuU2+JqeVpb73M/kAdeNJ1s4AZ3VGMYf tkaZ0wA6keVCuTM3opuu6m7ISYx6tTlTdcNPk39NWCiKGzz9c3vbXPYYQqWyOxXQrcwU y0R+VJqu+g8HRCIx6V9e8XzfGW1GB64JM7MoiGMyOPQCqbGqHysNhu3sIUszg5bcKxCa 7RLtZDDD3mHJIFMEl/bEiKLBzD6WkTQyDhR0bGlfbcow4cGksT+Rz7FOBCfZ+kER/AC7 TnuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7zBZdw0QR2xfUPWBNQtxUbIiIrWFdv5YEeUMRjjrapc=; b=ESkpjR9zoHOXD0IKEDbDEV0r6o5nAhqMONWtLBF/7nPDb9gz5x83IXPcQ6s3O3keXD YIa9S1OiYhYwuC2te/Z5QfHTg58SZukhPWM93eIMdRW7PLJzKUOi81ofqwTpye8921NW EF+uvaO3YY8dNgGxjIaN8F2uMgmUCPfqPgO8dwqdLWHjd1fRuI1zNgWpWj5R1co/3hod eyytwplnwU/EBAdPdSbX41DfKWyuCBuIElvIbhK0aS/EsDdT/Uf+G+P4iENLVwhB+YMI RekEcn/HLN7697gF0Q0bcykgCEKLVSxVf2XUdugJnKXCoC4r0v3F+vbZOLIDVqFLJCRy dORw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=TENBVCQQ; 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 ce9si8920214edb.70.2020.07.03.10.39.01; Fri, 03 Jul 2020 10:39:24 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=TENBVCQQ; 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 S1726447AbgGCRiV (ORCPT + 99 others); Fri, 3 Jul 2020 13:38:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbgGCRiV (ORCPT ); Fri, 3 Jul 2020 13:38:21 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE88C061794 for ; Fri, 3 Jul 2020 10:38:20 -0700 (PDT) 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.