Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbbGTL2E (ORCPT ); Mon, 20 Jul 2015 07:28:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44472 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbbGTL2C (ORCPT ); Mon, 20 Jul 2015 07:28:02 -0400 Message-ID: <55ACDB3B.8010607@suse.cz> Date: Mon, 20 Jul 2015 13:27:55 +0200 From: Vlastimil Babka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Minchan Kim , Joonsoo Kim CC: Andrew Morton , Mel Gorman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Joonsoo Kim Subject: Re: [PATCH 2/2] mm/page_owner: set correct gfp_mask on page_owner References: <1436942039-16897-1-git-send-email-iamjoonsoo.kim@lge.com> <1436942039-16897-2-git-send-email-iamjoonsoo.kim@lge.com> <20150716000613.GE988@bgram> In-Reply-To: <20150716000613.GE988@bgram> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1728 Lines: 40 On 07/16/2015 02:06 AM, Minchan Kim wrote: > On Wed, Jul 15, 2015 at 03:33:59PM +0900, Joonsoo Kim wrote: >> @@ -2003,7 +2005,7 @@ int __isolate_free_page(struct page *page, unsigned int order) >> zone->free_area[order].nr_free--; >> rmv_page_order(page); >> >> - set_page_owner(page, order, 0); >> + set_page_owner(page, order, __GFP_MOVABLE); > > It seems the reason why __GFP_MOVABLE is okay is that __isolate_free_page > works on a free page on MIGRATE_MOVABLE|MIGRATE_CMA's pageblock. But if we > break the assumption in future, here is broken again? I didn't study the page owner code yet and I'm catching up after vacation, but I share your concern. But I don't think the correctness depends on the pageblock we are isolating from. I think the assumption is that the isolated freepage will be used as a target for migration, and that only movable pages can be successfully migrated (but also CMA pages, and that information can be lost?). However there are also efforts to allow migrate e.g. driver pages that won't be marked as movable. And I'm not sure which migratetype are balloon pages which already have special migration code. So what I would think (without knowing all details) that the page owner info should be transferred during page migration with all the other flags, and shouldn't concern __isolate_free_page() at all? > Please put the comment here to cause it. > > Otherwise, Good spot! > > Reviewed-by: Minchan Kim > -- 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/