Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753240AbaGHHXQ (ORCPT ); Tue, 8 Jul 2014 03:23:16 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45515 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbaGHHXP (ORCPT ); Tue, 8 Jul 2014 03:23:15 -0400 Message-ID: <53BB9C61.8040902@suse.cz> Date: Tue, 08 Jul 2014 09:23:13 +0200 From: Vlastimil Babka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Gioh Kim , Joonsoo Kim , Andrew Morton CC: "Kirill A. Shutemov" , Rik van Riel , Peter Zijlstra , Mel Gorman , Johannes Weiner , Minchan Kim , Yasuaki Ishimatsu , Zhang Yanfei , "Srivatsa S. Bhat" , Tang Chen , Naoya Horiguchi , Bartlomiej Zolnierkiewicz , Wen Congyang , Marek Szyprowski , Michal Nazarewicz , Laura Abbott , Heesub Shin , "Aneesh Kumar K.V" , Ritesh Harjani , t.stanislaws@samsung.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/10] mm/page_alloc: use get_onbuddy_migratetype() to get buddy list type References: <1404460675-24456-1-git-send-email-iamjoonsoo.kim@lge.com> <1404460675-24456-9-git-send-email-iamjoonsoo.kim@lge.com> <53BAC37D.3060703@suse.cz> <53BB42E3.4060005@lge.com> In-Reply-To: <53BB42E3.4060005@lge.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/08/2014 03:01 AM, Gioh Kim wrote: > > > 2014-07-08 오전 12:57, Vlastimil Babka 쓴 글: >> On 07/04/2014 09:57 AM, Joonsoo Kim wrote: >>> When isolating free page, what we want to know is which list >>> the page is linked. If it is linked in isolate migratetype buddy list, >>> we can skip watermark check and freepage counting. And if it is linked >>> in CMA migratetype buddy list, we need to fixup freepage counting. For >>> this purpose, get_onbuddy_migratetype() is more fit and cheap than >>> get_pageblock_migratetype(). So use it. >> >> Hm but you made get_onbuddy_migratetype() work only with CONFIG_MEMORY_ISOLATION. And __isolate_free_page is (despite the name) not at all limited to CONFIG_MEMORY_ISOLATION. >> > > Current __isolate_free_page is called by only split_free_page, and split_free_page by isolate_freepages_block. > split_free_page is called only for isolated pages now but It can be changed someday. Yeah, but isolate_freepages_block is also not part of CONFIG_MEMORY_ISOLATION. Unfortunately, there are two distinct concepts of memory isolation and LRU isolation, that are not distinguished in function names. > I think get_onbuddy_migratetype should work with any situation. > > And I think the name of get_onbuddy_migratetype is confused. > Because of _onbuddy_, it might look like that the pages are buddy pages. > I think the original name _freepage_ is proper one. > > >>> Signed-off-by: Joonsoo Kim >>> --- >>> mm/page_alloc.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c >>> index e1c4c3e..d9fb8bb 100644 >>> --- a/mm/page_alloc.c >>> +++ b/mm/page_alloc.c >>> @@ -1597,7 +1597,7 @@ static int __isolate_free_page(struct page *page, unsigned int order) >>> BUG_ON(!PageBuddy(page)); >>> >>> zone = page_zone(page); >>> - mt = get_pageblock_migratetype(page); >>> + mt = get_onbuddy_migratetype(page); >>> >>> if (!is_migrate_isolate(mt)) { >>> /* Obey watermarks as if the page was being allocated */ >>> >> >> > > -- > 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 > -- 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/