From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752597AbbFSNly (ORCPT ); Fri, 19 Jun 2015 09:41:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51294 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbbFSNlp (ORCPT ); Fri, 19 Jun 2015 09:41:45 -0400 Date: Fri, 19 Jun 2015 14:41:39 +0100 From: Mel Gorman To: Vlastimil Babka Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Minchan Kim , Joonsoo Kim , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel , David Rientjes Subject: Re: [PATCH 1/6] mm, compaction: more robust check for scanners meeting Message-ID: <20150619134139.GA11809@suse.de> References: <1433928754-966-1-git-send-email-vbabka@suse.cz> <1433928754-966-2-git-send-email-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1433928754-966-2-git-send-email-vbabka@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 10, 2015 at 11:32:29AM +0200, Vlastimil Babka wrote: > Compaction should finish when the migration and free scanner meet, i.e. they > reach the same pageblock. Currently however, the test in compact_finished() > simply just compares the exact pfns, which may yield a false negative when the > free scanner position is in the middle of a pageblock and the migration scanner > reaches the beginning of the same pageblock. > > This hasn't been a problem until commit e14c720efdd7 ("mm, compaction: remember > position within pageblock in free pages scanner") allowed the free scanner > position to be in the middle of a pageblock between invocations. The hot-fix > 1d5bfe1ffb5b ("mm, compaction: prevent infinite loop in compact_zone") > prevented the issue by adding a special check in the migration scanner to > satisfy the current detection of scanners meeting. > > However, the proper fix is to make the detection more robust. This patch > introduces the compact_scanners_met() function that returns true when the free > scanner position is in the same or lower pageblock than the migration scanner. > The special case in isolate_migratepages() introduced by 1d5bfe1ffb5b is > removed. > > Suggested-by: Joonsoo Kim > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel > Cc: David Rientjes Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by kanga.kvack.org (Postfix) with ESMTP id B518F6B0088 for ; Fri, 19 Jun 2015 09:41:46 -0400 (EDT) Received: by wicnd19 with SMTP id nd19so19534899wic.1 for ; Fri, 19 Jun 2015 06:41:46 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id u3si19909530wje.160.2015.06.19.06.41.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Jun 2015 06:41:45 -0700 (PDT) Date: Fri, 19 Jun 2015 14:41:39 +0100 From: Mel Gorman Subject: Re: [PATCH 1/6] mm, compaction: more robust check for scanners meeting Message-ID: <20150619134139.GA11809@suse.de> References: <1433928754-966-1-git-send-email-vbabka@suse.cz> <1433928754-966-2-git-send-email-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1433928754-966-2-git-send-email-vbabka@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Minchan Kim , Joonsoo Kim , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel , David Rientjes On Wed, Jun 10, 2015 at 11:32:29AM +0200, Vlastimil Babka wrote: > Compaction should finish when the migration and free scanner meet, i.e. they > reach the same pageblock. Currently however, the test in compact_finished() > simply just compares the exact pfns, which may yield a false negative when the > free scanner position is in the middle of a pageblock and the migration scanner > reaches the beginning of the same pageblock. > > This hasn't been a problem until commit e14c720efdd7 ("mm, compaction: remember > position within pageblock in free pages scanner") allowed the free scanner > position to be in the middle of a pageblock between invocations. The hot-fix > 1d5bfe1ffb5b ("mm, compaction: prevent infinite loop in compact_zone") > prevented the issue by adding a special check in the migration scanner to > satisfy the current detection of scanners meeting. > > However, the proper fix is to make the detection more robust. This patch > introduces the compact_scanners_met() function that returns true when the free > scanner position is in the same or lower pageblock than the migration scanner. > The special case in isolate_migratepages() introduced by 1d5bfe1ffb5b is > removed. > > Suggested-by: Joonsoo Kim > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel > Cc: David Rientjes Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- 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