Message ID | 20230802112458.230221601@infradead.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp413263vqx; Wed, 2 Aug 2023 05:19:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHCWktqds34TxiYBavNsLPY78HQcyGxA8x5Ie/aS3Vm/FSDQ4RqSSybyp10xAl4SLesAV5E X-Received: by 2002:a17:907:2bdc:b0:992:d013:1132 with SMTP id gv28-20020a1709072bdc00b00992d0131132mr4896822ejc.1.1690978753061; Wed, 02 Aug 2023 05:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690978753; cv=none; d=google.com; s=arc-20160816; b=ClutWOPHsoPxgsol8vnZ127zuPzpzxRfXeRO4ZqNHMeSUQGQghH5qePj1Edf0jRVik +tGgsQP10jwHwt4YEvaYsFoa08Je1bYz4aHSGL96cWXNCMf08bzeXyzYQqxqa1tXpqYg dDGxT4H3OkmBauN5FisOkAv1s6tx+ntD7O2/mIusvIF+jZLftvSohdQZL7Ojot19ywQR pC0bLe+x4H3C23K4Njjs0GER6+QBa6A+9S6ga+ADxOtO7aWubUJHx4IRvadqJq6Ve11o TNygBjPDvt/6Ay5tpqOiM5J/be8vwn4YMDkovp0VTtm8oV3yPpr5XeHGKichFV1MkFMu mb8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:user-agent:message-id :dkim-signature; bh=pEzjmPZQXN77TfOBMdhvBXs5pJBqHRT9DURj0AtCKHE=; fh=lUE9eyTnU5CZ+6MDp0UzjXzwNcZpdX/0uvx1B0FKpvc=; b=XD1c7QVLZjBVna4YEw6TmIP8jme68Biu84/scBwwECeJ3ZC8x0XROMworixKUkYJjI +5ouG4X54TgMaRkRyw+RLohh9dVVISAg6t3WsPL6TiVB/JoDymqRIKYoKrikrHxCP8ud M/pd+MkdRQGl4u51Of+l1AEgYSUsPsD+uKXy8XKYMt0xFpCOlB+TiwkgiKObFBwQ3Tur 5pTG2JmZPLh1rD6zNfLZVMMAFHo4ISbFpqEgnM2tf58SSmVDSQZMkfbhjxpBKK+9oKV/ 7Lv+vklYEylPIYwAd/EWVxTIBni/h5faQ918WnrMFvqankzZp8gMK56TIPcObfosCy3Z QwOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=gH9Vvqjf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga15-20020a170906b84f00b0099bc8f0358asi6638196ejb.918.2023.08.02.05.18.48; Wed, 02 Aug 2023 05:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=gH9Vvqjf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234231AbjHBL0G (ORCPT <rfc822;maxi.paulin@gmail.com> + 99 others); Wed, 2 Aug 2023 07:26:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234256AbjHBLZu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 2 Aug 2023 07:25:50 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3E3126AD for <linux-kernel@vger.kernel.org>; Wed, 2 Aug 2023 04:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Subject:Cc:To:From:Date:Message-ID: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=pEzjmPZQXN77TfOBMdhvBXs5pJBqHRT9DURj0AtCKHE=; b=gH9VvqjfKQeu8GRITPA9/0Mxky U+DkHsrNsz99JRiY/ArRgb98cyxmV2ywjyiFEqn5FVeGkYqaG9P84dnRGx1t4mws1JZgxJQXZSDdY 4hHq5qzVFTEzMgL0LPybLEMoI7HnmrW5g1R/LQbsdOfoSRHdTZYkWy/gXEMRreFL0KEKCXvZ0Bu4R cJ5zDtoz2jpk17k6bQ/Ho/SZqc6FXAvsR6CPeVTdD0MSqnD5lQ7j+zZxDZFRi+MSoljswLlyOAlc/ QkSlrpBfMMYmQnaBkmNVukBIJB+eeYcuF88Zvk4yb4j6FVCGgharkaV3XfxfAxDO5BRDAvRfR9t4d PacBCP7g==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qR9yx-00FtnV-18; Wed, 02 Aug 2023 11:25: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 9D60C300301; Wed, 2 Aug 2023 13:25:34 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 7CCB421000C78; Wed, 2 Aug 2023 13:25:34 +0200 (CEST) Message-ID: <20230802112458.230221601@infradead.org> User-Agent: quilt/0.66 Date: Wed, 02 Aug 2023 13:24:58 +0200 From: Peter Zijlstra <peterz@infradead.org> To: yury.norov@gmail.com, andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk Cc: peterz@infradead.org, Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, tglx@linutronix.de, rppt@kernel.org Subject: [PATCH 0/2] nodemask: Use nr_node_ids X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773119736431902869 X-GMAIL-MSGID: 1773119736431902869 |
Series |
nodemask: Use nr_node_ids
|
|
Message
Peter Zijlstra
Aug. 2, 2023, 11:24 a.m. UTC
Hi, While working on some NUMA code recently, I stumbled over how nodemask operations are unconditionally using MAX_NUMNODES length, which is typically 1024 for distro configs. OTOH typical machines only have <=4 nodes, so doing these crazy long bitmap ops is silly. Therefore do as cpumask does and use nr_node_ids analogous to nr_cpu_ids. These patches are lightly tested -- as in they seem to boot on a 2 node system.