summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-04-13 10:47:34 +0200
committerMichal Hocko <mhocko@suse.com>2017-04-21 10:14:36 +0200
commita5b3613bf1db12b6823db5b30dfb2240e420f18b (patch)
tree0bc9e65311394ec97fef25da98462d39f40e9a20
parentb7f7d140665873f784ef752e2d66f48a80225f68 (diff)
mm, compaction: skip over holes in __reset_isolation_suitable
__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 PageReserved. Signed-off-by: Michal Hocko <mhocko@suse.com>
-rw-r--r--mm/compaction.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 613c59e928cb..fb548e4c7bd4 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -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;