From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752533AbcFUCNG (ORCPT ); Mon, 20 Jun 2016 22:13:06 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:37530 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbcFUCNE (ORCPT ); Mon, 20 Jun 2016 22:13:04 -0400 Subject: Re: [PATCH v3 0/6] Introduce ZONE_CMA To: Joonsoo Kim References: <1464243748-16367-1-git-send-email-iamjoonsoo.kim@lge.com> <20160526080454.GA11823@shbuild888> <20160527052820.GA13661@js1304-P5Q-DELUXE> <20160527062527.GA32297@shbuild888> <20160527064218.GA14858@js1304-P5Q-DELUXE> <20160527072702.GA7782@shbuild888> <5763A909.8080907@hisilicon.com> <20160620064816.GB13747@js1304-P5Q-DELUXE> CC: Feng Tang , Andrew Morton , Rik van Riel , Johannes Weiner , "mgorman@techsingularity.net" , Laura Abbott , "Minchan Kim" , Marek Szyprowski , "Michal Nazarewicz" , "Aneesh Kumar K.V" , Vlastimil Babka , Rui Teng , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Yiping Xu , "fujun (F)" , "Zhuangluan Su" , Dan Zhao , From: Chen Feng Message-ID: <5768A198.7050607@hisilicon.com> Date: Tue, 21 Jun 2016 10:08:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160620064816.GB13747@js1304-P5Q-DELUXE> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.193.64] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0206.5768A221.0052,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 4361fcefe25ebe5f20e571122cedc8c2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/6/20 14:48, Joonsoo Kim wrote: > On Fri, Jun 17, 2016 at 03:38:49PM +0800, Chen Feng wrote: >> Hi Kim & feng, >> >> Thanks for the share. In our platform also has the same use case. >> >> We only let the alloc with GFP_HIGHUSER_MOVABLE in memory.c to use cma memory. >> >> If we add zone_cma, It seems can resolve the cma migrate issue. >> >> But when free_hot_cold_page, we need let the cma page goto system directly not the pcp. >> It can be fail while cma_alloc and cma_release. If we alloc the whole cma pages which >> declared before. > > Hmm...I'm not sure I understand your explanation. So, if I miss > something, please let me know. We calls drain_all_pages() when > isolating pageblock and alloc_contig_range() also has one > drain_all_pages() calls to drain pcp pages. And, after pageblock isolation, > freed pages belonging to MIGRATE_ISOLATE pageblock will go to the > buddy directly so there would be no problem you mentioned. Isn't it? > Yes, you are right. I mean if the we free cma page to pcp-list, it will goto the migrate_movable list. Then the alloc with movable flag can use the cma memory from the list with buffered_rmqueue. But that's not what we want. It will cause the migrate fail if all movable alloc can use cma memory. If I am wrong, please correct me. Thanks. > Thanks. > > . >