Skip to content

Commit

Permalink
mm/page_owner: align with pageblock_nr pages
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: zhong jiang <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
xiongzhongjiang authored and hnaz committed Mar 17, 2017
1 parent 9170b7f commit 1f81a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/page_owner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1f81a71

Please sign in to comment.