diff options
author | zhong jiang <zhongjiang@huawei.com> | 2017-02-08 10:27:46 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-02-09 21:53:05 +1100 |
commit | 77b230992c16a4a44c9136a0f466787b953d580d (patch) | |
tree | d5d29a5bcb699e20d31a021dc75dc2622b7a7a98 /mm | |
parent | e654adb872e556fa6190f7eec4b2758eab2b9a5c (diff) |
mm/page_owner: align with pageblock_nr pages
When pfn_valid(pfn) returns false, pfn should be aligned with
pageblock_nr_pages other than MAX_ORDER_NR_PAGES in init_pages_in_zone,
because the skipped 2M may be valid pfn, as a result, early allocated
count will not be accurate.
Link: http://lkml.kernel.org/r/1468938136-24228-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_owner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c index 60634dc53a88..754efdd52bf7 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -527,7 +527,7 @@ static void init_pages_in_zone(pg_data_t *pgdat, struct zone *zone) */ for (; pfn < end_pfn; ) { if (!pfn_valid(pfn)) { - pfn = ALIGN(pfn + 1, MAX_ORDER_NR_PAGES); + pfn = ALIGN(pfn + 1, pageblock_nr_pages); continue; } |