Re: [PATCH v3 1/2] mm/sparse: add sparse_init_nid()

From: Pavel Tatashin
Date: Sun Jul 01 2018 - 23:29:10 EST

> > So, on the first failure, we even stop trying to populate other
> > sections. No more memory to do so.
> This is the thing I worry about. In old sparse_mem_maps_populate_node()
> you can see, when not present or failed to populate, just continue. This
> is the main difference between yours and the old code. The key logic is
> changed here.

I do not see how we can succeed after the first failure. We still
allocate from the same node:

sparse_mem_map_populate() may fail only if we could not allocate large
enough buffer vmemmap_buf_start earlier.

This means that in:
vmemmap_alloc_block_buf() (no buffer, so call allocator)
vmemmap_alloc_block(size, node);
__earlyonly_bootmem_alloc(node, size, size, __pa(MAX_DMA_ADDRESS));
memblock_virt_alloc_try_nid_raw() -> Nothing changes for
this call to succeed. So, all consequent calls to
sparse_mem_map_populate() in this node will fail as well.

> >
> Forgot mentioning it's the vervion in mm/sparse-vmemmap.c

Sorry, I do not understand what is vervion.

Thank you,