Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754782AbaFKLqu (ORCPT ); Wed, 11 Jun 2014 07:46:50 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53388 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbaFKLqt (ORCPT ); Wed, 11 Jun 2014 07:46:49 -0400 Message-ID: <539841A7.3040202@suse.cz> Date: Wed, 11 Jun 2014 13:46:47 +0200 From: Vlastimil Babka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Minchan Kim CC: David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Greg Thelen , Mel Gorman , Joonsoo Kim , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel Subject: Re: [PATCH 08/10] mm, compaction: pass gfp mask to compact_control References: <1402305982-6928-1-git-send-email-vbabka@suse.cz> <1402305982-6928-8-git-send-email-vbabka@suse.cz> <20140611024855.GH15630@bbox> In-Reply-To: <20140611024855.GH15630@bbox> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/11/2014 04:48 AM, Minchan Kim wrote: > On Mon, Jun 09, 2014 at 11:26:20AM +0200, Vlastimil Babka wrote: >> From: David Rientjes >> >> struct compact_control currently converts the gfp mask to a migratetype, but we >> need the entire gfp mask in a follow-up patch. >> >> Pass the entire gfp mask as part of struct compact_control. >> >> Signed-off-by: David Rientjes >> Signed-off-by: Vlastimil Babka >> Cc: Minchan Kim >> Cc: Mel Gorman >> Cc: Joonsoo Kim >> Cc: Michal Nazarewicz >> Cc: Naoya Horiguchi >> Cc: Christoph Lameter >> Cc: Rik van Riel >> --- >> mm/compaction.c | 12 +++++++----- >> mm/internal.h | 2 +- >> 2 files changed, 8 insertions(+), 6 deletions(-) >> >> diff --git a/mm/compaction.c b/mm/compaction.c >> index c339ccd..d1e30ba 100644 >> --- a/mm/compaction.c >> +++ b/mm/compaction.c >> @@ -965,8 +965,8 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, >> return ISOLATE_SUCCESS; >> } >> >> -static int compact_finished(struct zone *zone, >> - struct compact_control *cc) >> +static int compact_finished(struct zone *zone, struct compact_control *cc, >> + const int migratetype) > > If we has gfp_mask, we could use gfpflags_to_migratetype from cc->gfp_mask. > What's is your intention? Can't speak for David but I left it this way as it means gfpflags_to_migratetype is only called once per compact_zone. Now I realize my patch 10/10 repeats the call in isolate_migratepages_range so I'll probably update that as well. -- 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/