linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: sparse: Skip no-map regions in memblocks_present
@ 2019-07-12  8:51 KarimAllah Ahmed
  2019-07-12 23:09 ` Wei Yang
  2019-07-23  7:06 ` Michal Hocko
  0 siblings, 2 replies; 5+ messages in thread
From: KarimAllah Ahmed @ 2019-07-12  8:51 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: KarimAllah Ahmed, Andrew Morton, Pavel Tatashin, Oscar Salvador,
	Michal Hocko, Mike Rapoport, Baoquan He, Qian Cai, Wei Yang,
	Logan Gunthorpe

Do not mark regions that are marked with nomap to be present, otherwise
these memblock cause unnecessarily allocation of metadata.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Qian Cai <cai@lca.pw>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-23  7:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12  8:51 [PATCH] mm: sparse: Skip no-map regions in memblocks_present KarimAllah Ahmed
2019-07-12 23:09 ` Wei Yang
2019-07-13 13:53   ` Raslan, KarimAllah
2019-07-13 16:52     ` Wei Yang
2019-07-23  7:06 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).