Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932797AbbBBHKq (ORCPT ); Mon, 2 Feb 2015 02:10:46 -0500 Received: from lgeamrelo04.lge.com ([156.147.1.127]:53470 "EHLO lgeamrelo04.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932458AbbBBHKp (ORCPT ); Mon, 2 Feb 2015 02:10:45 -0500 X-Original-SENDERIP: 10.177.222.153 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Mon, 2 Feb 2015 16:12:23 +0900 From: Joonsoo Kim To: Zhang Yanfei Cc: Andrew Morton , Vlastimil Babka , Mel Gorman , David Rientjes , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] mm/compaction: enhance compaction finish condition Message-ID: <20150202071223.GD6488@js1304-P5Q-DELUXE> References: <1422621252-29859-1-git-send-email-iamjoonsoo.kim@lge.com> <1422621252-29859-5-git-send-email-iamjoonsoo.kim@lge.com> 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: 1922 Lines: 38 On Sat, Jan 31, 2015 at 11:58:03PM +0800, Zhang Yanfei wrote: > At 2015/1/30 20:34, Joonsoo Kim wrote: > > From: Joonsoo > > > > 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. > > > > Secondly, condition is too excessive compared to page allocator's logic. > > We can steal freepage from other migratetype and change pageblock > > migratetype on more relaxed conditions in page allocator. This is designed > > to prevent fragmentation and we can use it here. Imposing hard constraint > > only to the compaction doesn't help much in this case since page allocator > > would cause fragmentation again. > > Changing both two behaviours in compaction may change the high order allocation > behaviours in the buddy allocator slowpath, so just as Vlastimil suggested, > some data from allocator should be necessary and helpful, IMHO. As Vlastimil said, fragmentation effect should be checked. I will do it and report the result on next version. 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/