On Fri 12-07-19 10:51:31, KarimAllah Ahmed wrote: > Do not mark regions that are marked with nomap to be present, otherwise > these memblock cause unnecessarily allocation of metadata.
This begs for much more information. How come nomap regions are in usable memblocks? What if memblock allocator used that memory? In other words, shouldn't nomap (an unusable memory iirc) be in reserved memblocks or removed altogethher? > Cc: Andrew Morton <[email protected]> > Cc: Pavel Tatashin <[email protected]> > Cc: Oscar Salvador <[email protected]> > Cc: Michal Hocko <[email protected]> > Cc: Mike Rapoport <[email protected]> > Cc: Baoquan He <[email protected]> > Cc: Qian Cai <[email protected]> > Cc: Wei Yang <[email protected]> > Cc: Logan Gunthorpe <[email protected]> > Cc: [email protected] > Cc: [email protected] > Signed-off-by: KarimAllah Ahmed <[email protected]> > --- > mm/sparse.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/mm/sparse.c b/mm/sparse.c > index fd13166..33810b6 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -256,6 +256,10 @@ void __init memblocks_present(void) > struct memblock_region *reg; > > for_each_memblock(memory, reg) { > + > + if (memblock_is_nomap(reg)) > + continue; > + > memory_present(memblock_get_region_node(reg), > memblock_region_memory_base_pfn(reg), > memblock_region_memory_end_pfn(reg)); > -- > 2.7.4 -- Michal Hocko SUSE Labs

