Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751264AbdHaBkF (ORCPT ); Wed, 30 Aug 2017 21:40:05 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:40765 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbdHaBkE (ORCPT ); Wed, 30 Aug 2017 21:40:04 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Thu, 31 Aug 2017 10:40:49 +0900 From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , Rik van Riel , Johannes Weiner , mgorman@techsingularity.net, Laura Abbott , Minchan Kim , Marek Szyprowski , Michal Nazarewicz , "Aneesh Kumar K . V" , Russell King , Will Deacon , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com Subject: Re: [PATCH 1/3] mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE Message-ID: <20170831014048.GA24271@js1304-P5Q-DELUXE> References: <1503556593-10720-1-git-send-email-iamjoonsoo.kim@lge.com> <1503556593-10720-2-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Content-Length: 2113 Lines: 55 On Tue, Aug 29, 2017 at 11:16:18AM +0200, Vlastimil Babka wrote: > On 08/24/2017 08:36 AM, js1304@gmail.com wrote: > > From: Joonsoo Kim > > > > 0. History > > > > This patchset is the follow-up of the discussion about the > > "Introduce ZONE_CMA (v7)" [1]. Please reference it if more information > > is needed. > > > > [...] > > > > > [1]: lkml.kernel.org/r/1491880640-9944-1-git-send-email-iamjoonsoo.kim@lge.com > > [2]: https://lkml.org/lkml/2014/10/15/623 > > [3]: http://www.spinics.net/lists/linux-mm/msg100562.html > > > > Reviewed-by: Aneesh Kumar K.V > > Acked-by: Vlastimil Babka > > The previous version has introduced ZONE_CMA, so I would think switching > to ZONE_MOVABLE is enough to drop previous reviews. Perhaps most of the > code involved is basically the same, though? Yes, most of the code involved is the same. I considered to drop previous review tags but most of the code and concept is the same so I decide to keep review tags. I should mention it in cover-letter but I forgot to mention it. Sorry about that. > Anyway I checked the current patch and did some basic tests with qemu, > so you can keep my ack. Thanks! > > BTW, if we dropped NR_FREE_CMA_PAGES, could we also drop MIGRATE_CMA and > related hooks? Is that counter really that useful as it works right now? > It will decrease both by CMA allocations (which has to be explicitly > freed) and by movable allocations (which can be migrated). What if only > CMA alloc/release touched it? I think that NR_FREE_CMA_PAGES would not be as useful as previous. We can remove it. However, removing MIGRATE_CMA has a problem. There is an usecase to check if the page comes from the CMA area or not. See check_page_span() in mm/usercopy.c. I can implement it differently by iterating whole CMA area and finding the match, but I'm not sure it's performance effect. I guess that it would be marginal. Anyway, I'd like not to cause any side-effect now. After patches are settle down on mainline, I will try to remove them as you suggested. Thanks.