[lkml]   [2018]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 1/2] mm/sparse: add sparse_init_nid()
On 07/01/18 at 11:03pm, Pavel Tatashin wrote:
> > Ah, yes, I misunderstood it, sorry for that.
> >
> > Then I have only one concern, for vmemmap case, if one section doesn't
> > succeed to populate its memmap, do we need to skip all the remaining
> > sections in that node?
> Yes, in sparse_populate_node() we have the following:
> 294 for (pnum = pnum_begin; map_index < map_count; pnum++) {
> 295 if (!present_section_nr(pnum))
> 296 continue;
> 297 if (!sparse_mem_map_populate(pnum, nid, NULL))
> 298 break;
> 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.

void __init sparse_mem_maps_populate_node(struct page **map_map,
unsigned long pnum_begin,
unsigned long pnum_end,
unsigned long map_count, int nodeid)
for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
struct mem_section *ms;

if (!present_section_nr(pnum))

map_map[pnum] = sparse_mem_map_populate(pnum, nodeid, NULL);
if (map_map[pnum])
ms = __nr_to_section(pnum);
pr_err("%s: sparsemem memory map backing failed some memory will not be available\n",
ms->section_mem_map = 0;

 \ /
  Last update: 2018-07-02 05:15    [W:0.060 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site