From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v6 02/21] mem: allow memseg lists to be marked as external Date: Thu, 27 Sep 2018 12:29:43 +0100 Message-ID: References: <996b0784-8516-8d89-e5e4-4c3f7bdda50a@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Neil Horman , John McNamara , Marko Kovacevic , Hemant Agrawal , Matan Azrad , Shahaf Shuler , Yongseok Koh , Maxime Coquelin , Tiwei Bie , Zhihong Wang , Bruce Richardson , Olivier Matz , Andrew Rybchenko , laszlo.madarassy@ericsson.com, laszlo.vadkerti@ericsson.com, andras.kovacs@ericsson.com, winnie.tian@ericsson.com, daniel.andrasi@ericsson.com, janos.kobor@ericsson.com, geza.koblo@ericsson.com, srinath.mannam@broadcom.com, scott.branden@broadcom.com, ajit.khaparde@broadcom.com, keith.wiles@intel.com, thomas@monjalon.net, alejandro.lucero@netronome.com To: Shreyansh Jain , dev@dpdk.org Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 2375F1B3A3 for ; Thu, 27 Sep 2018 13:29:51 +0200 (CEST) In-Reply-To: <996b0784-8516-8d89-e5e4-4c3f7bdda50a@nxp.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 27-Sep-18 12:12 PM, Shreyansh Jain wrote: > On Thursday 27 September 2018 04:38 PM, Burakov, Anatoly wrote: >> On 27-Sep-18 12:03 PM, Shreyansh Jain wrote: >>> On Thursday 27 September 2018 04:10 PM, Anatoly Burakov wrote: >>>> When we allocate and use DPDK memory, we need to be able to >>>> differentiate between DPDK hugepage segments and segments that >>>> were made part of DPDK but are externally allocated. Add such >>>> a property to memseg lists. >>>> >>>> This breaks the ABI, so bump the EAL library ABI version and >>>> document the change in release notes. This also breaks a few >>>> internal assumptions about memory contiguousness, so adjust >>>> malloc code in a few places. >>>> >>>> All current calls for memseg walk functions were adjusted to >>>> ignore external segments where it made sense. >>>> >>>> Mempools is a special case, because we may be asked to allocate >>>> a mempool on a specific socket, and we need to ignore all page >>>> sizes on other heaps or other sockets. Previously, this >>>> assumption of knowing all page sizes was not a problem, but it >>>> will be now, so we have to match socket ID with page size when >>>> calculating minimum page size for a mempool. >>>> >>>> Signed-off-by: Anatoly Burakov >>>> Acked-by: Andrew Rybchenko >>>> --- >>>> >>> >>> Specifically for bus/fslmc perspective and generically for others: >>> >>> Acked-by: Shreyansh Jain >>> >>> >> >> Actually, this patch may need some further adjustment, since it makes >> assumption about not wanting to map external memory for DMA. >> >> Specifically - there's an fslmc dma map function that now skips >> external memory segments. Are you sure that's how it's supposed to be? >> > > I thought over that. > For now yes. If we need to map external memory, and there is an event > that would be called back, it should be handled separately. So, for > example, a PMD level API to handle such requests from applications. Well, technically such an event is already available, now that external memory allocations trigger mem events :) > > The point is that how the external memory is handled is use-case > specific - the need to have its events reported back is definitely > there, but its handling is still a grey area. > > Once the patches make their way in, I can always come back and tune that. > OK, fair enough. -- Thanks, Anatoly