[PATCH 2/3] mm, compaction: skip over holes in __reset_isolation_suitable
From: Michal Hocko
Date: Sat Apr 15 2017 - 08:19:23 EST
From: Michal Hocko <mhocko@xxxxxxxx>
__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@xxxxxxxx>
---
mm/compaction.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/compaction.c b/mm/compaction.c
index de64dedefe0e..df4156d8b037 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -239,6 +239,8 @@ static void __reset_isolation_suitable(struct zone *zone)
continue;
page = pfn_to_page(pfn);
+ if (PageReserved(page))
+ continue;
if (zone != page_zone(page))
continue;
--
2.11.0