From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752030AbaEGVrM (ORCPT ); Wed, 7 May 2014 17:47:12 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:38434 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbaEGVrI (ORCPT ); Wed, 7 May 2014 17:47:08 -0400 Date: Wed, 7 May 2014 14:47:05 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Vlastimil Babka cc: Andrew Morton , Hugh Dickins , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Minchan Kim , Mel Gorman , Joonsoo Kim , Bartlomiej Zolnierkiewicz , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel Subject: Re: [PATCH v2 2/2] mm/compaction: avoid rescanning pageblocks in isolate_freepages In-Reply-To: <1399464550-26447-2-git-send-email-vbabka@suse.cz> Message-ID: References: <1399464550-26447-1-git-send-email-vbabka@suse.cz> <1399464550-26447-2-git-send-email-vbabka@suse.cz> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 May 2014, Vlastimil Babka wrote: > The compaction free scanner in isolate_freepages() currently remembers PFN of > the highest pageblock where it successfully isolates, to be used as the > starting pageblock for the next invocation. The rationale behind this is that > page migration might return free pages to the allocator when migration fails > and we don't want to skip them if the compaction continues. > > Since migration now returns free pages back to compaction code where they can > be reused, this is no longer a concern. This patch changes isolate_freepages() > so that the PFN for restarting is updated with each pageblock where isolation > is attempted. Using stress-highalloc from mmtests, this resulted in 10% > reduction of the pages scanned by the free scanner. > > Note that the somewhat similar functionality that records highest successful > pageblock in zone->compact_cached_free_pfn, remains unchanged. This cache is > used when the whole compaction is restarted, not for multiple invocations of > the free scanner during single compaction. > > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Bartlomiej Zolnierkiewicz > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel Acked-by: David Rientjes From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by kanga.kvack.org (Postfix) with ESMTP id 53BA66B007D for ; Wed, 7 May 2014 17:47:09 -0400 (EDT) Received: by mail-pa0-f48.google.com with SMTP id rd3so1727548pab.7 for ; Wed, 07 May 2014 14:47:08 -0700 (PDT) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [2607:f8b0:400e:c03::22c]) by mx.google.com with ESMTPS id xf3si14406620pab.425.2014.05.07.14.47.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 14:47:08 -0700 (PDT) Received: by mail-pa0-f44.google.com with SMTP id ld10so1770406pab.3 for ; Wed, 07 May 2014 14:47:08 -0700 (PDT) Date: Wed, 7 May 2014 14:47:05 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH v2 2/2] mm/compaction: avoid rescanning pageblocks in isolate_freepages In-Reply-To: <1399464550-26447-2-git-send-email-vbabka@suse.cz> Message-ID: References: <1399464550-26447-1-git-send-email-vbabka@suse.cz> <1399464550-26447-2-git-send-email-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: Andrew Morton , Hugh Dickins , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Minchan Kim , Mel Gorman , Joonsoo Kim , Bartlomiej Zolnierkiewicz , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel On Wed, 7 May 2014, Vlastimil Babka wrote: > The compaction free scanner in isolate_freepages() currently remembers PFN of > the highest pageblock where it successfully isolates, to be used as the > starting pageblock for the next invocation. The rationale behind this is that > page migration might return free pages to the allocator when migration fails > and we don't want to skip them if the compaction continues. > > Since migration now returns free pages back to compaction code where they can > be reused, this is no longer a concern. This patch changes isolate_freepages() > so that the PFN for restarting is updated with each pageblock where isolation > is attempted. Using stress-highalloc from mmtests, this resulted in 10% > reduction of the pages scanned by the free scanner. > > Note that the somewhat similar functionality that records highest successful > pageblock in zone->compact_cached_free_pfn, remains unchanged. This cache is > used when the whole compaction is restarted, not for multiple invocations of > the free scanner during single compaction. > > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Bartlomiej Zolnierkiewicz > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel Acked-by: David Rientjes -- 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