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=1796244639; b=14uRsCVSUYXsB1xuwzIWP50WaRsUfc9EeaeFmGR+1K0A9UslBSOWGHjUH1mAToIGYIe6 IGQYVNQUfa4t0KK6/BMsEqcJ1RsXqdiCTAZjf2zRe1BSNzTsz4BEqOBU2aA76EdniF8Rh STs+ljnuYAqDmYAKpmWsUpVZW1bGn+UrAuuyqqAMpMc445HIwkJRGAKKVgvi3Jj/peaxJ NDXazXA8ZpTHGPTm5V+vAd8JzieN3sktq5d7gaIe1cTIilpGz9iy3zEJNufVAprkWqYQb LxRpv44XkWOVtia/kFdLk8A097vb9CONVCwrHN79OW8Tve9NM2qyTc5yMs2+1lqmVyA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796244639; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=q4GbuTRWSbnEit2I4uIGBIQT8dwM9yHoH5nuf2l0qXE=; b=TjMbfHuwrvPCqBjhDzjjQPscHouaICQXRFatR+TcZ2UopmrbhV0yy1JeY3jYed9T6zDB 2iq7646TgLsLyOup8oMG+BTE1czDB8YNq4Q83rFG40zTOIr2dxd5SwUP4QU8jhJU+yukq B2YEFOLsZcEd79MUptszkuvkUxMYG8vQ/hdqcjxgSrk1klXk/Q0HKon6RGIEFLJZwXRSu oPaChTyDDH+KsVLwQQX/PdMF9tVW1b19w983JOcSMw2jycggp9gJUkH/7Fo8/SHuTST0T c1xLQCdjqyoy033a/vLNDp4odM2fIKVOEvdks3gUFvJCtfEbiV+x8cU1bhRTTVXnwmw== 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="e8R/6a9U"; 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 7AA2A606A322; Wed, 2 Dec 2026 20:50:39 +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=e8R/6a9U Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CE561F00919; Wed, 2 Dec 2026 20:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796244639; bh=q4GbuTRWSbnEit2I4uIGBIQT8dwM9yHoH5nuf2l0qXE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=e8R/6a9Uhu/6FJCbkk0CHSzs11yVcqkavLlbmjeGd65OTNGsyACTLslIKyeNfi0OI 4FT62MXDPRFR2bhDWy5VM5+Mn6HmDDvKc3Ugn/4jj4smCM+5U6b0B2IXsBeEZMtH+Y hJVOxRzecP0QgJhzm5YSyTrH1OB80CLls8diNsxI/gmUpwikv59k3ZHp3nRfxdj1xc HCMicOt2SFhk0X7VD+8B6SVZnJuZqKtvG8SfH3cyoBTy2C+nBEMF05ym6soBEaCCXP 1Rd4u7UYQLF6gi8+gf93A5kB2RronZU4MuvAH54Ld2k3un2OIwz7XEgz/oVQi/xucP +BbF/IhOulrgw== Date: Wed, 2 Dec 2026 20:50:25 +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-acpi@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: Yuri - you may have missed the below because it was sent as a follow up to original feedback, thanks. On Mon, Nov 30, 2026 at 12:20:00PM +0000, Lorenzo Stoakes (ARM) wrote: > 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 -- Cheers, Lorenzo