Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933842AbbBCGxl (ORCPT ); Tue, 3 Feb 2015 01:53:41 -0500 Received: from lgeamrelo04.lge.com ([156.147.1.127]:61479 "EHLO lgeamrelo04.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933524AbbBCGxj (ORCPT ); Tue, 3 Feb 2015 01:53:39 -0500 X-Original-SENDERIP: 10.177.222.153 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Tue, 3 Feb 2015 15:55:21 +0900 From: Joonsoo Kim To: Zhang Yanfei Cc: Vlastimil Babka , Andrew Morton , Mel Gorman , David Rientjes , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zhang Yanfei Subject: Re: [RFC PATCH v3 3/3] mm/compaction: enhance compaction finish condition Message-ID: <20150203065521.GB9822@js1304-P5Q-DELUXE> References: <1422861348-5117-1-git-send-email-iamjoonsoo.kim@lge.com> <1422861348-5117-3-git-send-email-iamjoonsoo.kim@lge.com> <54CF4F61.3070905@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 1698 Lines: 36 On Mon, Feb 02, 2015 at 09:51:01PM +0800, Zhang Yanfei wrote: > Hello, > > At 2015/2/2 18:20, Vlastimil Babka wrote: > > On 02/02/2015 08:15 AM, Joonsoo Kim wrote: > >> Compaction has anti fragmentation algorithm. It is that freepage > >> should be more than pageblock order to finish the compaction if we don't > >> find any freepage in requested migratetype buddy list. This is for > >> mitigating fragmentation, but, there is a lack of migratetype > >> consideration and it is too excessive compared to page allocator's anti > >> fragmentation algorithm. > >> > >> Not considering migratetype would cause premature finish of compaction. > >> For example, if allocation request is for unmovable migratetype, > >> freepage with CMA migratetype doesn't help that allocation and > >> compaction should not be stopped. But, current logic regards this > >> situation as compaction is no longer needed, so finish the compaction. > > > > This is only for order >= pageblock_order, right? Perhaps should be told explicitly. > > I might be wrong. If we applied patch1, so after the system runs for some time, > there must be no MIGRATE_CMA free pages in the system, right? If so, the > example above doesn't exist anymore. Hello, Compaction could migrate all pages on MIGRATE_CMA pageblock, and, in this case, order >= pageblock_order could be true. And, cma freepages are used only for fallback so even if applying patch1, it could be possible. 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/