diff options
author | zhong jiang <zhongjiang@huawei.com> | 2017-05-26 11:32:06 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-05-29 09:22:31 +1000 |
commit | c6df3beb3661ae2d8ef03d66343fb68c8c5b8332 (patch) | |
tree | 6216349ed7a93ce677103a6f248fae84ea0bc43a | |
parent | a38fabd54c5311bbf59a8ffdcefdee2eceea1cc9 (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>
-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; } |