From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753060AbcEBHtx (ORCPT ); Mon, 2 May 2016 03:49:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:49926 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472AbcEBHtw (ORCPT ); Mon, 2 May 2016 03:49:52 -0400 Subject: Re: [PATCH v2 0/6] Introduce ZONE_CMA To: Joonsoo Kim , Mel Gorman References: <1461561670-28012-1-git-send-email-iamjoonsoo.kim@lge.com> <20160425053653.GA25662@js1304-P5Q-DELUXE> <20160428103927.GM2858@techsingularity.net> <20160429065145.GA19896@js1304-P5Q-DELUXE> <20160429092902.GQ2858@techsingularity.net> <20160502061423.GA31646@js1304-P5Q-DELUXE> Cc: Andrew Morton , Rik van Riel , Johannes Weiner , Laura Abbott , Minchan Kim , Marek Szyprowski , Michal Nazarewicz , "Aneesh Kumar K.V" , linux-mm@kvack.org, linux-kernel@vger.kernel.org From: Vlastimil Babka Message-ID: <5727069B.5070600@suse.cz> Date: Mon, 2 May 2016 09:49:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160502061423.GA31646@js1304-P5Q-DELUXE> 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 On 05/02/2016 08:14 AM, Joonsoo Kim wrote: >>> > >Although it's separate issue, I should mentioned one thing. Related to >>> > >I/O pinning issue, ZONE_CMA don't get blockdev allocation request so >>> > >I/O pinning problem is much reduced. >>> > > >> > >> >This is not super-clear from the patch. blockdev is using GFP_USER so it >> >already should not be classed as MOVABLE. I could easily be looking in >> >the wrong place or missed which allocation path sets GFP_MOVABLE. > Okay. Please see sb_bread(), sb_getblk(), __getblk() and __bread() in > include/linux/buffer_head.h. These are main functions used by blockdev > and they uses GFP_MOVABLE. To fix permanent allocation case which is > used by mount and cannot be released until umount, Gioh introduces > sb_bread_unmovable() but there are many remaining issues that prevent > migration at the moment and avoid blockdev allocation from CMA area is > preferable approach. Hm Patch 3/6 describes the lack of blockdev allocations mostly as a limitation, although it does mention the possible advantages later. Anyway, this doesn't have to be specific to ZONE_CMA, right? You could just change ALLOC_CMA handling to consider GFP_HIGHUSER_MOVABLE instead of just __GFP_MOVABLE. For ZONE_CMA it might be inevitable as you describe, but it's already possible to do that now, if the advantages are larger than the disadvantages.