Re: [PATCH] mm/hugetlb: use separate nodemask for bootmem allocations

From: Oscar Salvador
Date: Wed Apr 09 2025 - 03:41:35 EST


On Tue, Apr 08, 2025 at 08:48:33AM -0700, Frank van der Linden wrote:
> next_nid_to_alloc is used to remember the last node that was allocated
> from in __alloc_bootmem_huge_page(), so that the next call will
> continue at the node after the one that was successfully allocated
> from. The code there looks a bit confusing, since the macro
> for_each_node_mask_to_alloc is used there not really as a for loop,
> but simply as a way of saying "try this node and remember the next
> one".

Yes, this makes sense, thanks for explaining Frank :-)


--
Oscar Salvador
SUSE Labs