From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758964Ab3HNHHB (ORCPT ); Wed, 14 Aug 2013 03:07:01 -0400 Received: from lgeamrelo01.lge.com ([156.147.1.125]:49803 "EHLO LGEAMRELO01.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757219Ab3HNHHA (ORCPT ); Wed, 14 Aug 2013 03:07:00 -0400 X-AuditID: 9c93017d-b7cdfae0000026c0-1b-520b2c9203e4 Date: Wed, 14 Aug 2013 16:07:05 +0900 From: Minchan Kim To: Xishi Qiu Cc: Andrew Morton , Mel Gorman , riel@redhat.com, aquini@redhat.com, linux-mm@kvack.org, LKML Subject: Re: [PATCH] mm: skip the page buddy block instead of one page Message-ID: <20130814070705.GA21133@bbox> References: <520B0B75.4030708@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <520B0B75.4030708@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Aug 14, 2013 at 12:45:41PM +0800, Xishi Qiu wrote: > A large free page buddy block will continue many times, so if the page > is free, skip the whole page buddy block instead of one page. > > Signed-off-by: Xishi Qiu Nitpick is it could change nr_scanned's result so that COMPACMIGRATE_SCANNED of vmstat could be smaller than old. It means that compaction efficiency would pretend to be better than old and if something on userspace have been depends on it, it would be broken. But I don't know such usecase so I will pass the decision to others. Anyway, I suppose this patch. If it's real concern, we can fix it with increasing nr_scanned by page_order. Thanks. Acked-by: Minchan Kim > --- > mm/compaction.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 05ccb4c..874bae1 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -520,9 +520,10 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, > goto next_pageblock; > > /* Skip if free */ > - if (PageBuddy(page)) > + if (PageBuddy(page)) { > + low_pfn += (1 << page_order(page)) - 1; > continue; > - > + } > /* > * For async migration, also only scan in MOVABLE blocks. Async > * migration is optimistic to see if the minimum amount of work > -- > 1.7.1 > > -- > 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 -- Kind regards, Minchan Kim