diff options
author | Xishi Qiu <qiuxishi@huawei.com> | 2015-11-05 21:48:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 22:34:48 -0500 |
commit | bde304bdf4ec4a5f58cc1e90fe2d9cd2d96304c4 (patch) | |
tree | d9adda3338bf50c3ce47b1d884689e0d3db848e1 /mm | |
parent | a2c1aad3b5fccbb948878b75f9b8f13248666fd6 (diff) |
mm/page_alloc.c: skip ZONE_MOVABLE if required_kernelcore is larger than totalpages
If kernelcore was not specified, or the kernelcore size is zero
(required_movablecore >= totalpages), or the kernelcore size is larger
than totalpages, there is no ZONE_MOVABLE. We should fill the zone with
both kernel memory and movable memory.
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: <zhongjiang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 86f7d952e2cc..06e62300d627 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -5675,8 +5675,11 @@ static void __init find_zone_movable_pfns_for_nodes(void) | |||
5675 | required_kernelcore = max(required_kernelcore, corepages); | 5675 | required_kernelcore = max(required_kernelcore, corepages); |
5676 | } | 5676 | } |
5677 | 5677 | ||
5678 | /* If kernelcore was not specified, there is no ZONE_MOVABLE */ | 5678 | /* |
5679 | if (!required_kernelcore) | 5679 | * If kernelcore was not specified or kernelcore size is larger |
5680 | * than totalpages, there is no ZONE_MOVABLE. | ||
5681 | */ | ||
5682 | if (!required_kernelcore || required_kernelcore >= totalpages) | ||
5680 | goto out; | 5683 | goto out; |
5681 | 5684 | ||
5682 | /* usable_startpfn is the lowest possible pfn ZONE_MOVABLE can be at */ | 5685 | /* usable_startpfn is the lowest possible pfn ZONE_MOVABLE can be at */ |