From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968106AbdD0H7c (ORCPT ); Thu, 27 Apr 2017 03:59:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:56442 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967048AbdD0H7Z (ORCPT ); Thu, 27 Apr 2017 03:59:25 -0400 Date: Thu, 27 Apr 2017 09:59:22 +0200 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 Subject: Re: [PATCH 08/13] mm, compaction: skip over holes in __reset_isolation_suitable Message-ID: <20170427075922.GC4706@dhcp22.suse.cz> References: <20170421120512.23960-1-mhocko@kernel.org> <20170421120512.23960-9-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170421120512.23960-9-mhocko@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 21-04-17 14:05:11, Michal Hocko wrote: > 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. ups, forgot to update the changelog here. s@PageReserved@pfn_to_online_page()@ > Signed-off-by: Michal Hocko > --- > mm/compaction.c | 5 ++--- > 1 file 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; > > -- > 2.11.0 > -- Michal Hocko SUSE Labs