linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mm: fix type information of memoryless node
@ 2015-08-29  7:34 Zhen Lei
  2015-09-01 21:54 ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2015-08-29  7:34 UTC (permalink / raw)
  To: Andrew Morton, Michal Hocko, Tejun Heo, Johannes Weiner,
	Vladimir Davydov, Joonsoo Kim, linux-mm, linux-kernel
  Cc: Zefan Li, Xinwei Hu, Tianhong Ding, Hanjun Guo, Zhen Lei

For a memoryless node, the output of get_pfn_range_for_nid are all zero.
It will display mem from 0 to -1.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 mm/page_alloc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5b5240b..5839f31 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5455,7 +5455,8 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
 #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
 	get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
 	pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid,
-		(u64)start_pfn << PAGE_SHIFT, ((u64)end_pfn << PAGE_SHIFT) - 1);
+		(u64)start_pfn << PAGE_SHIFT,
+		end_pfn ? ((u64)end_pfn << PAGE_SHIFT) - 1 : 0);
 #endif
 	calculate_node_totalpages(pgdat, start_pfn, end_pfn,
 				  zones_size, zholes_size);
--
2.5.0


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 1/1] mm: fix type information of memoryless node
  2015-08-29  7:34 [PATCH 1/1] mm: fix type information of memoryless node Zhen Lei
@ 2015-09-01 21:54 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2015-09-01 21:54 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Andrew Morton, Michal Hocko, Tejun Heo, Johannes Weiner,
	Vladimir Davydov, Joonsoo Kim, linux-mm, linux-kernel, Zefan Li,
	Xinwei Hu, Tianhong Ding, Hanjun Guo

On Sat, 29 Aug 2015, Zhen Lei wrote:

> For a memoryless node, the output of get_pfn_range_for_nid are all zero.
> It will display mem from 0 to -1.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Acked-by: David Rientjes <rientjes@google.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2015-09-01 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-29  7:34 [PATCH 1/1] mm: fix type information of memoryless node Zhen Lei
2015-09-01 21:54 ` David Rientjes

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).