Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbbFPFfp (ORCPT ); Tue, 16 Jun 2015 01:35:45 -0400 Received: from lgeamrelo04.lge.com ([156.147.1.127]:49047 "EHLO lgeamrelo04.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbbFPFfh (ORCPT ); Tue, 16 Jun 2015 01:35:37 -0400 X-Original-SENDERIP: 10.177.222.220 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Tue, 16 Jun 2015 14:37:44 +0900 From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Minchan Kim , Mel Gorman , 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: <20150616053743.GA12641@js1304-P5Q-DELUXE> 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=us-ascii 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 Content-Length: 1610 Lines: 31 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 Acked-by: Joonsoo Kim Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/