From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A24BD2B96 for ; Fri, 15 Apr 2016 10:47:35 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 15 Apr 2016 01:47:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,486,1455004800"; d="scan'208";a="686679313" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.220.32]) ([10.237.220.32]) by FMSMGA003.fm.intel.com with ESMTP; 15 Apr 2016 01:47:33 -0700 To: Olivier Matz , Thomas Monjalon References: <1500486.8lzTDt5Q91@xps13> <570FAD3E.6040509@6wind.com> <570FB996.4070801@intel.com> <5710946A.9080001@6wind.com> Cc: dev@dpdk.org From: Sergio Gonzalez Monroy Message-ID: <5710AAA5.5090003@intel.com> Date: Fri, 15 Apr 2016 09:47:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <5710946A.9080001@6wind.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] memory allocation requirements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 08:47:36 -0000 On 15/04/2016 08:12, Olivier Matz wrote: > Hi, > > On 04/14/2016 05:39 PM, Sergio Gonzalez Monroy wrote: >>> Just to mention that some evolutions [1] are planned in mempool in >>> 16.07, allowing to populate a mempool with several chunks of memory, >>> and still ensuring that the objects are physically contiguous. It >>> completely removes the need to allocate a big virtually contiguous >>> memory zone (and also physically contiguous if not using >>> rte_mempool_create_xmem(), which is probably the case in most of >>> the applications). >>> >>> Knowing this, the code that remaps the hugepages to get the largest >>> possible physically contiguous zone probably becomes useless after >>> the mempool series. Changing it to only one mmap(file) in hugetlbfs >>> per NUMA socket would clearly simplify this part of EAL. >>> >> Are you suggesting to make those changes after the mempool series >> has been applied but keeping the current memzone/malloc behavior? > I wonder if the default property of memzone/malloc which is to > allocate physically contiguous memory shouldn't be dropped. It could > remain optional, knowing that allocating a physically contiguous zone > larger than a page cannot be guaranteed. > > But yes, I'm in favor of doing these changes in eal_memory.c, it would > drop a lot a complex code (all rtemap* stuff), and today I'm not seeing > any big issue of doing it... maybe we'll find one during the > discussion :) I'm in favor of doing those changes but then I think we need to support allocating no contig memory through memzone/malloc or other libraries such as librte_hash may not be able to get the memory they need, right? Otherwise all library would need a rework like the mempool series to deal with non-contig memory. For contig memory, I would prefer a new API for dma areas (something similar to rte_eth_dma_zone_reserve() in ethdev) that would transparently deal with the case where we have multiple huge page sizes. Sergio > Regards, > Olivier