Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932730AbbBBHBq (ORCPT ); Mon, 2 Feb 2015 02:01:46 -0500 Received: from lgeamrelo02.lge.com ([156.147.1.126]:53883 "EHLO lgeamrelo02.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932199AbbBBHBn (ORCPT ); Mon, 2 Feb 2015 02:01:43 -0500 X-Original-SENDERIP: 10.177.222.153 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Mon, 2 Feb 2015 16:03:21 +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 3/4] mm/page_alloc: separate steal decision from steal behaviour part Message-ID: <20150202070321.GB6488@js1304-P5Q-DELUXE> References: <1422621252-29859-1-git-send-email-iamjoonsoo.kim@lge.com> <1422621252-29859-4-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: 1780 Lines: 51 On Sat, Jan 31, 2015 at 08:38:10PM +0800, Zhang Yanfei wrote: > At 2015/1/30 20:34, Joonsoo Kim wrote: > > From: Joonsoo > > > > This is preparation step to use page allocator's anti fragmentation logic > > in compaction. This patch just separates steal decision part from actual > > steal behaviour part so there is no functional change. > > > > Signed-off-by: Joonsoo Kim > > --- > > mm/page_alloc.c | 49 ++++++++++++++++++++++++++++++++----------------- > > 1 file changed, 32 insertions(+), 17 deletions(-) > > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 8d52ab1..ef74750 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -1122,6 +1122,24 @@ static void change_pageblock_range(struct page *pageblock_page, > > } > > } > > > > +static bool can_steal_freepages(unsigned int order, > > + int start_mt, int fallback_mt) > > +{ > > + if (is_migrate_cma(fallback_mt)) > > + return false; > > + > > + if (order >= pageblock_order) > > + return true; > > + > > + if (order >= pageblock_order / 2 || > > + start_mt == MIGRATE_RECLAIMABLE || > > + start_mt == MIGRATE_UNMOVABLE || > > + page_group_by_mobility_disabled) > > + return true; > > + > > + return false; > > +} > > So some comments which can tell the cases can or cannot steal freepages > from other migratetype is necessary IMHO. Actually we can just > move some comments in try_to_steal_pages to here. Yes, move some comments looks sufficient to me. I will fix it. 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/