From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933588AbcHaHvu (ORCPT ); Wed, 31 Aug 2016 03:51:50 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:55977 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933515AbcHaHvo (ORCPT ); Wed, 31 Aug 2016 03:51:44 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Wed, 31 Aug 2016 16:58:24 +0900 From: Joonsoo Kim To: "Aneesh Kumar K.V" Cc: Andrew Morton , Rik van Riel , Johannes Weiner , mgorman@techsingularity.net, Laura Abbott , Minchan Kim , Marek Szyprowski , Michal Nazarewicz , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/6] mm/cma: introduce new zone, ZONE_CMA Message-ID: <20160831075823.GA22757@js1304-P5Q-DELUXE> References: <1472447255-10584-1-git-send-email-iamjoonsoo.kim@lge.com> <1472447255-10584-3-git-send-email-iamjoonsoo.kim@lge.com> <87vayisfx3.fsf@linux.vnet.ibm.com> <87pooqsa41.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pooqsa41.fsf@linux.vnet.ibm.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 Tue, Aug 30, 2016 at 06:10:46PM +0530, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > > > .... > > > >> static inline void check_highest_zone(enum zone_type k) > >> { > >> - if (k > policy_zone && k != ZONE_MOVABLE) > >> + if (k > policy_zone && k != ZONE_MOVABLE && !is_zone_cma_idx(k)) > >> policy_zone = k; > >> } > >> > > > > > > Should we apply policy to allocation from ZONE CMA ?. CMA reserve > > happens early and may mostly come from one node. Do we want the > > CMA allocation to fail if we use mbind(MPOL_BIND) with a node mask not > > including that node on which CMA is reserved, considering CMA memory is > > going to be used for special purpose. > > Looking at this again, I guess CMA alloc is not going to depend on > memory policy, but this is for other movable allocation ? This is for usual file cache or anonymous page allocation. IIUC, policy_zone is used to determine if mempolicy should be applied or not and setting policy_zone to ZONE_CMA makes mempolicy less useful. Thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by kanga.kvack.org (Postfix) with ESMTP id B22486B0038 for ; Wed, 31 Aug 2016 03:51:42 -0400 (EDT) Received: by mail-pa0-f69.google.com with SMTP id le9so78634635pab.0 for ; Wed, 31 Aug 2016 00:51:42 -0700 (PDT) Received: from lgeamrelo13.lge.com (LGEAMRELO13.lge.com. [156.147.23.53]) by mx.google.com with ESMTP id 194si49607430pfy.175.2016.08.31.00.51.41 for ; Wed, 31 Aug 2016 00:51:41 -0700 (PDT) Date: Wed, 31 Aug 2016 16:58:24 +0900 From: Joonsoo Kim Subject: Re: [PATCH v5 2/6] mm/cma: introduce new zone, ZONE_CMA Message-ID: <20160831075823.GA22757@js1304-P5Q-DELUXE> References: <1472447255-10584-1-git-send-email-iamjoonsoo.kim@lge.com> <1472447255-10584-3-git-send-email-iamjoonsoo.kim@lge.com> <87vayisfx3.fsf@linux.vnet.ibm.com> <87pooqsa41.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pooqsa41.fsf@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: "Aneesh Kumar K.V" Cc: Andrew Morton , Rik van Riel , Johannes Weiner , mgorman@techsingularity.net, Laura Abbott , Minchan Kim , Marek Szyprowski , Michal Nazarewicz , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Tue, Aug 30, 2016 at 06:10:46PM +0530, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > > > .... > > > >> static inline void check_highest_zone(enum zone_type k) > >> { > >> - if (k > policy_zone && k != ZONE_MOVABLE) > >> + if (k > policy_zone && k != ZONE_MOVABLE && !is_zone_cma_idx(k)) > >> policy_zone = k; > >> } > >> > > > > > > Should we apply policy to allocation from ZONE CMA ?. CMA reserve > > happens early and may mostly come from one node. Do we want the > > CMA allocation to fail if we use mbind(MPOL_BIND) with a node mask not > > including that node on which CMA is reserved, considering CMA memory is > > going to be used for special purpose. > > Looking at this again, I guess CMA alloc is not going to depend on > memory policy, but this is for other movable allocation ? This is for usual file cache or anonymous page allocation. IIUC, policy_zone is used to determine if mempolicy should be applied or not and setting policy_zone to ZONE_CMA makes mempolicy less useful. 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