On Mon, May 18, 2026 at 08:29:07AM +0200, Oscar Salvador (SUSE) wrote:
On Wed, May 13, 2026 at 09:04:36PM +0800, Muchun Song wrote:
quoted
void __init mm_core_init_early(void)
{
+ int nid;
+
hugetlb_cma_reserve();
hugetlb_bootmem_alloc();
free_area_init();
+
+ sparse_init();
+ for_each_node_state(nid, N_MEMORY)
+ sparse_vmemmap_init_nid_late(nid);
Would it not make more sense to hide sparse_vmemmap_init_nid_late()
within sparse_init() and have it called at the end of the function?
The flow would be:
sparse_init()
sparse_init_nid
sparse_vmemmap_init_nid_early
...
sparse_vmemmap_init_nid_late
I think it is better to have sparse stuff all together in one place instead of scattered.
Ah, I see that you later remove this stuff, so disregard this please.
--
Oscar Salvador
SUSE Labs