From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759220Ab0KRQZv (ORCPT ); Thu, 18 Nov 2010 11:25:51 -0500 Received: from gir.skynet.ie ([193.1.99.77]:35563 "EHLO gir.skynet.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754835Ab0KRQZu (ORCPT ); Thu, 18 Nov 2010 11:25:50 -0500 Date: Thu, 18 Nov 2010 16:25:36 +0000 From: Mel Gorman To: Andrea Arcangeli Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Subject: Re: [PATCH 56 of 66] transhuge isolate_migratepages() Message-ID: <20101118162535.GF8135@csn.ul.ie> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 03, 2010 at 04:28:31PM +0100, Andrea Arcangeli wrote: > From: Andrea Arcangeli > > It's not worth migrating transparent hugepages during compaction. Those > hugepages don't create fragmentation. > > Signed-off-by: Andrea Arcangeli Acked-by: Mel Gorman I think this will collide with my compaction series because of the "fast scanning" patch but the resolution should be trivial. Your check still should go in after the PageLRU check and the PageTransCompound check should still be after __isolate_lru_page. > --- > > diff --git a/mm/compaction.c b/mm/compaction.c > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -272,10 +272,25 @@ static unsigned long isolate_migratepage > if (PageBuddy(page)) > continue; > > + if (!PageLRU(page)) > + continue; > + > + /* > + * PageLRU is set, and lru_lock excludes isolation, > + * splitting and collapsing (collapsing has already > + * happened if PageLRU is set). > + */ > + if (PageTransHuge(page)) { > + low_pfn += (1 << compound_order(page)) - 1; > + continue; > + } > + > /* Try isolate the page */ > if (__isolate_lru_page(page, ISOLATE_BOTH, 0) != 0) > continue; > > + VM_BUG_ON(PageTransCompound(page)); > + > /* Successfully isolated */ > del_page_from_lru_list(zone, page, page_lru(page)); > list_add(&page->lru, migratelist); > -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 1FB586B0087 for ; Thu, 18 Nov 2010 11:25:52 -0500 (EST) Date: Thu, 18 Nov 2010 16:25:36 +0000 From: Mel Gorman Subject: Re: [PATCH 56 of 66] transhuge isolate_migratepages() Message-ID: <20101118162535.GF8135@csn.ul.ie> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Andrea Arcangeli Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov List-ID: On Wed, Nov 03, 2010 at 04:28:31PM +0100, Andrea Arcangeli wrote: > From: Andrea Arcangeli > > It's not worth migrating transparent hugepages during compaction. Those > hugepages don't create fragmentation. > > Signed-off-by: Andrea Arcangeli Acked-by: Mel Gorman I think this will collide with my compaction series because of the "fast scanning" patch but the resolution should be trivial. Your check still should go in after the PageLRU check and the PageTransCompound check should still be after __isolate_lru_page. > --- > > diff --git a/mm/compaction.c b/mm/compaction.c > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -272,10 +272,25 @@ static unsigned long isolate_migratepage > if (PageBuddy(page)) > continue; > > + if (!PageLRU(page)) > + continue; > + > + /* > + * PageLRU is set, and lru_lock excludes isolation, > + * splitting and collapsing (collapsing has already > + * happened if PageLRU is set). > + */ > + if (PageTransHuge(page)) { > + low_pfn += (1 << compound_order(page)) - 1; > + continue; > + } > + > /* Try isolate the page */ > if (__isolate_lru_page(page, ISOLATE_BOTH, 0) != 0) > continue; > > + VM_BUG_ON(PageTransCompound(page)); > + > /* Successfully isolated */ > del_page_from_lru_list(zone, page, page_lru(page)); > list_add(&page->lru, migratelist); > -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- 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/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org