From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752563AbdESHXi (ORCPT ); Fri, 19 May 2017 03:23:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:60247 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751071AbdESHXg (ORCPT ); Fri, 19 May 2017 03:23:36 -0400 Subject: Re: [PATCH 08/14] mm, compaction: skip over holes in __reset_isolation_suitable To: Michal Hocko , Andrew Morton Cc: linux-mm@kvack.org, Mel Gorman , 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 References: <20170515085827.16474-1-mhocko@kernel.org> <20170515085827.16474-9-mhocko@kernel.org> From: Vlastimil Babka Message-ID: Date: Fri, 19 May 2017 09:23:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170515085827.16474-9-mhocko@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/15/2017 10:58 AM, 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 > pfn_to_online_page() > > Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka > --- > 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; > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by kanga.kvack.org (Postfix) with ESMTP id BB322831F4 for ; Fri, 19 May 2017 03:23:36 -0400 (EDT) Received: by mail-wr0-f198.google.com with SMTP id q91so3292131wrb.8 for ; Fri, 19 May 2017 00:23:36 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id e133si13847489wma.1.2017.05.19.00.23.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 19 May 2017 00:23:35 -0700 (PDT) Subject: Re: [PATCH 08/14] mm, compaction: skip over holes in __reset_isolation_suitable References: <20170515085827.16474-1-mhocko@kernel.org> <20170515085827.16474-9-mhocko@kernel.org> From: Vlastimil Babka Message-ID: Date: Fri, 19 May 2017 09:23:33 +0200 MIME-Version: 1.0 In-Reply-To: <20170515085827.16474-9-mhocko@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko , Andrew Morton Cc: linux-mm@kvack.org, Mel Gorman , 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 On 05/15/2017 10:58 AM, 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 > pfn_to_online_page() > > Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka > --- > 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; > > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org