lkml.org 
[lkml]   [2015]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Do not use arbitrary large movablecore to calculate kernelcore
Date
If kernelcore is not set, then we are working with a very large kernelcore
for nothing - no movable zone will be created. If kernelcore is set,
then it is not respected at all.

Signed-off-by: Zhihui Zhang <zzhsuny@gmail.com>
---
mm/page_alloc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 40e2942..32bf5da 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5199,7 +5199,11 @@ static void __init find_zone_movable_pfns_for_nodes(void)
*/
required_movablecore =
roundup(required_movablecore, MAX_ORDER_NR_PAGES);
- corepages = totalpages - required_movablecore;
+
+ if (totalpages > required_movablecore)
+ corepages = totalpages - required_movablecore;
+ else
+ corepages = 0;

required_kernelcore = max(required_kernelcore, corepages);
}
--
1.9.1


\
 
 \ /
  Last update: 2015-03-29 06:01    [W:0.121 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site