From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796041213; b=E81g0n/LPbVb1V0bVDr+UGZdgxkDvSUz4mlkTqlo7EHZYMcPyIwHeCvHPMJtMgLY5I6y u10LbP8/EWutiuitzUzeJuUM3kigheApYFVlJ7klBf3qKtpLIE7EMfwiy08xSl68j/HgE AfO8BhBxLP2yqRJrR5D7EXcnGWamyiN8ejeKf2jRo9j7rpLa8OVneJtwTFo8W3xFwaJic /GB8+AOxaOjBDXi7gynJg5rK7WraoTV7EP4AncOgyv9i4Q/5F8qvveKf4jnRj/wSQLCp0 bcZXs/tlD/lsLE2cuXhgZWSDsZJBWn5gUqm69qj8VmH7aaL6PwDuBdiU2qB46E8YBpQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796041213; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=ttb93U2rdoPKLTcwUl32mSjuQiM8G+oL6gin97nWw24=; b=cuGbkBI+eZ77rvSSFA+013CoU2Lw88l8baBD+QhXxFnD7K/Zf8F/oLZSe2tXSZ8Xaoxw tu82P2rYVa1w5EJGiYmC9bgLA0VW/s0WUUVuuUz+cvySJzEBkQ9nFFcHQ7gfTypYKdGrp 0VJ3M6dHb3RkU59jeItjHLGpgcuK/BVN2fLSnOqqHZs9hG/HGpF9P6U3eYNvsnP1R4Q/D pTGMArBoUHJ4JMa7ioAsoEAy/+JzqRViK4OlJ0OeA78er0THfo6RBjktpvg3eFY8yXqNm VR5SLoB9SCAb8gDWOJqa6avV1pyMmwGL4/qsIPSCzFywZFWkSfNSyIxtVLMkJ8yJi+w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=dHq2IrFo; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1155606A31C; Mon, 30 Nov 2026 12:20:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=dHq2IrFo Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2F1E1F00A25; Mon, 30 Nov 2026 12:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796041213; bh=ttb93U2rdoPKLTcwUl32mSjuQiM8G+oL6gin97nWw24=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=dHq2IrFoushrHwSjUlUXj3xMO9SWeeI7S63wrGtH22LtppsUfKcSHTWgE0qFVukC8 r+qkFFp+AMdE8I5dnzd6ol+NKYG8pOt4F3moL184ORdkphnaeRzvue6GTXyaUqyLAB TVFtePhh8q//j7MgUsflmH8NxUw0Kizujlhq6jPo/5zlpSAGviPrRshpRUF9YbBXm/ mqcfvEH0qOlio587HgtiXzmDYv+83H5s1gohKbxDzPS+JGdn82vWhNdBsN2S35F8U8 0m4ZZxBt0lcHOzKCFZcWUSeIpyQ3KfUFEK7FaJfbB5B6aLHetyelW+VH4hkczQOquD xV4RaCUj+RQHw== Date: Mon, 30 Nov 2026 12:20:00 +0000 From: "Lorenzo Stoakes (ARM)" To: Yury Norov Cc: linux-kernel@vger.kernel.org, Andrew Morton , linux-mm@kvack.org, Rasmus Villemoes , David Hildenbrand , Gregory Price , Zi Yan , Joshua Hahn , Rakie Kim , Ying Huang , Muchun Song , Oscar Salvador , Johannes Weiner , Kairui Song , Thomas Bogendoerfer , "Rafael J. Wysocki" , Len Brown , Jens Axboe , Peter Zijlstra , Mel Gorman , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , linux-mips@vger.kernel.org, linux-acpi@vger.kernel.org, linux-block@vger.kernel.org, linux-trace-kernel@vger.kernel.org, "Liam R. Howlett" , Axel Rasmussen , Baolin Wang , Baoquan He , Barry Song , Linus Torvalds , Michal Hocko , Mike Rapoport , Qi Zheng , Shakeel Butt , Suren Baghdasaryan , Vlastimil Babka , Wei Xu , Yuanchu Xie , Yury Norov Subject: Re: [PATCH 00/11] nodemask: switch to runtime nr_node_ids Message-ID: References: <20261127230128.111933-1-ynorov@nvidia.com> X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Nov 30, 2026 at 11:51:02AM +0000, Lorenzo Stoakes (ARM) wrote: > On Fri, Nov 27, 2026 at 06:01:17PM -0500, Yury Norov wrote: > > Nodemasks have a compile-time capacity of MAX_NUMNODES, and > > nr_node_ids describes the runtime node ID usage. > > > > Modern distros, like my Ubuntu, default MAX_NUMNODES to 1024, while the > > actual number of nodes is typically smaller. All nodemask functions > > currently refer to the MAX_NUMNODES, which adds a substantial overhead > > on every traversing operation. > > > > This series switches the kernel to runtime length of nodemasks, which > > also saves up to 8K of .text for minimal config, and accelerates basic > > nodemask operations ~4x if MAX_NUMNODES == 1024 and nr_node_ids == 2. Also, in general, this cover letter is pretty incomplete. What is the motivation here? Is it purely cleanup? I mean I don't think anybody's hitting perf hot paths because of this? Or did you encounter something in a real workload that was impacted somehow? 8K of .text being saved is also surely neither here nor there also? I think if it's a cleanup it should say so because 'saves 8K and speeds up operations nobody cares about' isn't hugely motivating. What are the user-visible changes? Is MAX_NUMNODES retained and used for something else? How do the configs change? What testing did you do? I do worry about somebody somewhere making assumptions about MAX_NR_NODES that this potentially breaks. Also can hot-onlining CPUs or weird CXL stuff break anything here? Do the locks suffice etc.? Asking claude to dig in it seems like it doesn't touch anything like that, also probably worth saying that in the cover letter too. > > Thanks, given the current AI-generated fix onslaught I'm not quite sure if we're > looking to take anything non-fixy further this cycle ([0]). > > David, what do you reckon? > > -- > Cheers, Lorenzo > > [0]: https://lore.kernel.org/linux-mm/a2f584f6-e382-4876-aa6d-d5a34de6ee59@kernel.org/ -- Cheers, Lorenzo