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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBDEDECAAA1 for ; Tue, 6 Sep 2022 15:28:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239459AbiIFP2P (ORCPT ); Tue, 6 Sep 2022 11:28:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233106AbiIFP1m (ORCPT ); Tue, 6 Sep 2022 11:27:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D09949A98F for ; Tue, 6 Sep 2022 07:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=i2K+zsZ9EXbekOb4heRlLQlVokCHO5dRmwI+nz26n3A=; b=di0JtVQZMXTnCJcsT4GLigE/Kf MW5nVcA458rEOrI6L3XF88dRom9j4fzqVxVV9dh7OIM4gTzsqYCXdE5xn8dmFOtzoFg+X4Lyr84kX Igc9mmjcepfe6CNfoVDrvySXBDelvYOpLL88d4Ltx1aMTiL7cAMbrVlH2Z7/3z3taxciaFVpYt6oF rb0qvNv2ibxDeKQHK1gfDmA8yJpYtICxEVVA1K/ZqTWKSQtBU8Urzx6q7fqmAqRvkd/XdUMGpnG7m BNIR7piR47RwKJI4HaeHgD7X9pnuyPcm7aSIdZQG/ngccMWY2GbJAVlapyINrQ+Dm27cStf1RACwh ehki9Dfg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVZil-00AVFv-Rm; Tue, 06 Sep 2022 14:38:35 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E4194300023; Tue, 6 Sep 2022 16:38:33 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CE2C32012A05B; Tue, 6 Sep 2022 16:38:33 +0200 (CEST) Date: Tue, 6 Sep 2022 16:38:33 +0200 From: Peter Zijlstra To: Valentin Schneider Cc: Yury Norov , linux-kernel@vger.kernel.org, Andy Shevchenko , Rasmus Villemoes , Andrew Morton , Stephen Rothwell , Thomas Gleixner , "Paul E . McKenney" , Vlastimil Babka , Dmitry Vyukov , Sander Vanheule , Alexey Klimov , Eric Biggers Subject: Re: [PATCH v2 0/5] cpumask: cleanup nr_cpu_ids vs nr_cpumask_bits mess Message-ID: References: <20220905230820.3295223-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 06, 2022 at 01:06:47PM +0100, Valentin Schneider wrote: > #define nr_cpumask_bits nr_cpu_ids That assumes the CPU space is dense; is this so? That is, you can have 4 CPUs while the highest cpu number is vastly larger than 4. It's uncommon, but not unheard of I think. ISTR some BIOSes leaving holes in the CPU space when there were empty CPU sockets on the motherboard.