Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752263AbbFZCO6 (ORCPT ); Thu, 25 Jun 2015 22:14:58 -0400 Received: from mail-oi0-f42.google.com ([209.85.218.42]:33739 "EHLO mail-oi0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbbFZCOw (ORCPT ); Thu, 25 Jun 2015 22:14:52 -0400 MIME-Version: 1.0 In-Reply-To: <558C4EF0.2010603@suse.cz> References: <1435193121-25880-1-git-send-email-iamjoonsoo.kim@lge.com> <20150625110314.GJ11809@suse.de> <20150625172550.GA26927@suse.de> <558C4EF0.2010603@suse.cz> Date: Fri, 26 Jun 2015 11:14:51 +0900 Message-ID: Subject: Re: [RFC PATCH 00/10] redesign compaction algorithm From: Joonsoo Kim To: Vlastimil Babka Cc: Mel Gorman , Joonsoo Kim , Andrew Morton , LKML , Linux Memory Management List , Rik van Riel , David Rientjes , Minchan Kim Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2177 Lines: 41 2015-06-26 3:56 GMT+09:00 Vlastimil Babka : > On 25.6.2015 20:14, Joonsoo Kim wrote: >>> The long-term success rate of fragmentation avoidance depends on >>> > minimsing the number of UNMOVABLE allocation requests that use a >>> > pageblock belonging to another migratetype. Once such a fallback occurs, >>> > that pageblock potentially can never be used for a THP allocation again. >>> > >>> > Lets say there is an unmovable pageblock with 500 free pages in it. If >>> > the freepage scanner uses that pageblock and allocates all 500 free >>> > pages then the next unmovable allocation request needs a new pageblock. >>> > If one is not completely free then it will fallback to using a >>> > RECLAIMABLE or MOVABLE pageblock forever contaminating it. >> Yes, I can imagine that situation. But, as I said above, we already use >> non-movable pageblock for migration scanner. While unmovable >> pageblock with 500 free pages fills, some other unmovable pageblock >> with some movable pages will be emptied. Number of freepage >> on non-movable would be maintained so fallback doesn't happen. > > There's nothing that guarantees that the migration scanner will be emptying > unmovable pageblock, or am I missing something? As replied to Mel's comment, as number of unmovable pageblocks, which is filled by movable pages due to this compaction change increases, possible candidate reclaimable/migratable pages from them also increase. So, at some time, amount of used page by free scanner and amount of migrated page by migration scanner would be balanced. > Worse, those pageblocks would be > marked to skip by the free scanner if it isolated free pages from them, so > migration scanner would skip them. Yes, but, next iteration will move out movable pages from that pageblock and freed pages will be used for further unmovable allocation. So, in the long term, this doesn't make much more fragmentation. 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/