summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-08-22 07:04:49 +0000
committerJohannes Weiner <hannes@cmpxchg.org>2018-08-22 07:04:49 +0000
commit37eb6f70cea2a2356797a50c52d6b2aa5757e2fc (patch)
treedd1a6a567096f5b5848466136cc980fa0881b13e /mm
parenta4cf037e605373dc51d828f2cf7a96263ef2546f (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c
index 73db22c8bccf..c2494f034d02 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -541,7 +541,7 @@ static void init_pages_in_zone(pg_data_t *pgdat, struct zone *zone)
unsigned long block_end_pfn;
if (!pfn_valid(pfn)) {
- pfn = ALIGN(pfn + 1, MAX_ORDER_NR_PAGES);
+ pfn = ALIGN(pfn + 1, pageblock_nr_pages);
continue;
}