Skip to content

Commit

Permalink
mm, compaction: skip over holes in __reset_isolation_suitable
Browse files Browse the repository at this point in the history
__reset_isolation_suitable walks the whole zone pfn range and it tries
to jump over holes by checking the zone for each page.  It might still
stumble over offline pages, though.  Skip those by checking
pfn_to_online_page()

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Daniel Kiper <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Jerome Glisse <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Reza Arbab <[email protected]>
Cc: Tobias Regnery <[email protected]>
Cc: Toshi Kani <[email protected]>
Cc: Vitaly Kuznetsov <[email protected]>
Cc: Xishi Qiu <[email protected]>
Cc: Yasuaki Ishimatsu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Michal Hocko authored and torvalds committed Jul 6, 2017
1 parent 2d070ea commit ccbe1e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,9 @@ static void __reset_isolation_suitable(struct zone *zone)

cond_resched();

if (!pfn_valid(pfn))
page = pfn_to_online_page(pfn);
if (!page)
continue;

page = pfn_to_page(pfn);
if (zone != page_zone(page))
continue;

Expand Down

0 comments on commit ccbe1e4

Please sign in to comment.