From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752870AbcKHD5v (ORCPT ); Mon, 7 Nov 2016 22:57:51 -0500 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:59572 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752360AbcKHD5u (ORCPT ); Mon, 7 Nov 2016 22:57:50 -0500 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Tue, 8 Nov 2016 12:59:43 +0900 From: Joonsoo Kim To: Chen Feng Cc: Andrew Morton , Rik van Riel , Johannes Weiner , mgorman@techsingularity.net, Laura Abbott , Minchan Kim , Marek Szyprowski , Michal Nazarewicz , "Aneesh Kumar K.V" , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, saberlily.xia@hisilicon.com, Zhuangluan Su , Dan Zhao Subject: Re: [PATCH v6 2/6] mm/cma: introduce new zone, ZONE_CMA Message-ID: <20161108035942.GA31767@js1304-P5Q-DELUXE> References: <1476414196-3514-1-git-send-email-iamjoonsoo.kim@lge.com> <1476414196-3514-3-git-send-email-iamjoonsoo.kim@lge.com> <58184B28.8090405@hisilicon.com> <20161107061500.GA21159@js1304-P5Q-DELUXE> <58202881.5030004@hisilicon.com> <20161107072702.GC21159@js1304-P5Q-DELUXE> <582030CB.80905@hisilicon.com> <5820313A.80207@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5820313A.80207@hisilicon.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 07, 2016 at 03:46:02PM +0800, Chen Feng wrote: > > > On 2016/11/7 15:44, Chen Feng wrote: > > On 2016/11/7 15:27, Joonsoo Kim wrote: > >> On Mon, Nov 07, 2016 at 03:08:49PM +0800, Chen Feng wrote: > >>> > >>> > >>> On 2016/11/7 14:15, Joonsoo Kim wrote: > >>>> On Tue, Nov 01, 2016 at 03:58:32PM +0800, Chen Feng wrote: > >>>>> Hello, I hava a question on cma zone. > >>>>> > >>>>> When we have cma zone, cma zone will be the highest zone of system. > >>>>> > >>>>> In android system, the most memory allocator is ION. Media system will > >>>>> alloc unmovable memory from it. > >>>>> > >>>>> On low memory scene, will the CMA zone always do balance? > >>>> > >>>> Allocation request for low zone (normal zone) would not cause CMA zone > >>>> to be balanced since it isn't helpful. > >>>> > >>> Yes. But the cma zone will run out soon. And it always need to do balance. > >>> > >>> How about use migrate cma before movable and let cma type to fallback movable. > >>> > >>> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1263745.html > >> > >> ZONE_CMA approach will act like as your solution. Could you elaborate > >> more on the problem of zone approach? > >> > > > > The ZONE approach is that makes cma pages in a zone. It can cause a higher swapin/out > > than use migrate cma first. Interesting result. I should look at it more deeply. Could you explain me why the ZONE approach causes a higher swapin/out? > > > > The higher swapin/out may have a performance effect to application. The application may > > use too much time swapin memory. > > > > You can see my tested result attached for detail. And the baseline is result of [1]. > > > > > My test case is run 60 applications and alloc 512MB ION memory. > > Repeat this action 50 times Could you tell me more detail about your test? Kernel version? Total Memory? Total CMA Memory? Android system? What type of memory does ION uses? Other statistics? Etc... If it tested on the Android, I'm not sure that we need to consider it's result. Android has a lowmemory killer which is quitely different with normal reclaim behaviour. Thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f197.google.com (mail-pf0-f197.google.com [209.85.192.197]) by kanga.kvack.org (Postfix) with ESMTP id 681916B0038 for ; Mon, 7 Nov 2016 23:05:21 -0500 (EST) Received: by mail-pf0-f197.google.com with SMTP id n85so61077089pfi.4 for ; Mon, 07 Nov 2016 20:05:21 -0800 (PST) Received: from lgeamrelo11.lge.com (LGEAMRELO11.lge.com. [156.147.23.51]) by mx.google.com with ESMTP id t17si34683440pgi.158.2016.11.07.19.57.48 for ; Mon, 07 Nov 2016 19:57:48 -0800 (PST) Date: Tue, 8 Nov 2016 12:59:43 +0900 From: Joonsoo Kim Subject: Re: [PATCH v6 2/6] mm/cma: introduce new zone, ZONE_CMA Message-ID: <20161108035942.GA31767@js1304-P5Q-DELUXE> References: <1476414196-3514-1-git-send-email-iamjoonsoo.kim@lge.com> <1476414196-3514-3-git-send-email-iamjoonsoo.kim@lge.com> <58184B28.8090405@hisilicon.com> <20161107061500.GA21159@js1304-P5Q-DELUXE> <58202881.5030004@hisilicon.com> <20161107072702.GC21159@js1304-P5Q-DELUXE> <582030CB.80905@hisilicon.com> <5820313A.80207@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5820313A.80207@hisilicon.com> Sender: owner-linux-mm@kvack.org List-ID: To: Chen Feng Cc: Andrew Morton , Rik van Riel , Johannes Weiner , mgorman@techsingularity.net, Laura Abbott , Minchan Kim , Marek Szyprowski , Michal Nazarewicz , "Aneesh Kumar K.V" , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, saberlily.xia@hisilicon.com, Zhuangluan Su , Dan Zhao On Mon, Nov 07, 2016 at 03:46:02PM +0800, Chen Feng wrote: > > > On 2016/11/7 15:44, Chen Feng wrote: > > On 2016/11/7 15:27, Joonsoo Kim wrote: > >> On Mon, Nov 07, 2016 at 03:08:49PM +0800, Chen Feng wrote: > >>> > >>> > >>> On 2016/11/7 14:15, Joonsoo Kim wrote: > >>>> On Tue, Nov 01, 2016 at 03:58:32PM +0800, Chen Feng wrote: > >>>>> Hello, I hava a question on cma zone. > >>>>> > >>>>> When we have cma zone, cma zone will be the highest zone of system. > >>>>> > >>>>> In android system, the most memory allocator is ION. Media system will > >>>>> alloc unmovable memory from it. > >>>>> > >>>>> On low memory scene, will the CMA zone always do balance? > >>>> > >>>> Allocation request for low zone (normal zone) would not cause CMA zone > >>>> to be balanced since it isn't helpful. > >>>> > >>> Yes. But the cma zone will run out soon. And it always need to do balance. > >>> > >>> How about use migrate cma before movable and let cma type to fallback movable. > >>> > >>> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1263745.html > >> > >> ZONE_CMA approach will act like as your solution. Could you elaborate > >> more on the problem of zone approach? > >> > > > > The ZONE approach is that makes cma pages in a zone. It can cause a higher swapin/out > > than use migrate cma first. Interesting result. I should look at it more deeply. Could you explain me why the ZONE approach causes a higher swapin/out? > > > > The higher swapin/out may have a performance effect to application. The application may > > use too much time swapin memory. > > > > You can see my tested result attached for detail. And the baseline is result of [1]. > > > > > My test case is run 60 applications and alloc 512MB ION memory. > > Repeat this action 50 times Could you tell me more detail about your test? Kernel version? Total Memory? Total CMA Memory? Android system? What type of memory does ION uses? Other statistics? Etc... If it tested on the Android, I'm not sure that we need to consider it's result. Android has a lowmemory killer which is quitely different with normal reclaim behaviour. Thanks. -- 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