summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2017-11-30 12:12:23 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-12-01 10:39:36 +1100
commit6a9f9383f4542e3a82a0b5ecbc6e7b42fc5b320c (patch)
tree4d2b99ce026ee01004039a1350935a6046edbfc7 /mm
parente37e15d162f6cd32e52833189f7318098e80da79 (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> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_owner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c
index 5ab4f0a5ff4b..08e4e6e4cf3c 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -544,7 +544,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;
}