From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754192AbdDOMTL (ORCPT ); Sat, 15 Apr 2017 08:19:11 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:33666 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753862AbdDOMTJ (ORCPT ); Sat, 15 Apr 2017 08:19:09 -0400 From: Michal Hocko To: linux-mm@kvack.org Cc: Andrew Morton , Mel Gorman , Vlastimil Babka , Andrea Arcangeli , Jerome Glisse , Reza Arbab , Yasuaki Ishimatsu , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML , Michal Hocko Subject: [PATCH 2/3] mm, compaction: skip over holes in __reset_isolation_suitable Date: Sat, 15 Apr 2017 14:17:33 +0200 Message-Id: <20170415121734.6692-3-mhocko@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170415121734.6692-1-mhocko@kernel.org> References: <20170410110351.12215-1-mhocko@kernel.org> <20170415121734.6692-1-mhocko@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Hocko __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 --- 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