DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Alejandro Lucero <alejandro.lucero@netronome.com>
Cc: dev <dev@dpdk.org>,
	srinath.mannam@broadcom.com, scott.branden@broadcom.com,
	Ajit Khaparde <ajit.khaparde@broadcom.com>
Subject: Re: [dpdk-dev] [RFC 01/11] mem: allow memseg lists to be marked as external
Date: Tue, 10 Jul 2018 12:31:26 +0100	[thread overview]
Message-ID: <8f709746-0251-46a4-8823-dea3fb58cb69@intel.com> (raw)
In-Reply-To: <CAD+H993FEoqgxN0ghfQgxKD6ZeqLUh2S1+z5X5AxM=MfRFgCfA@mail.gmail.com>

On 10-Jul-18 12:18 PM, Alejandro Lucero wrote:
> On Fri, Jul 6, 2018 at 2:17 PM, Anatoly Burakov <anatoly.burakov@intel.com>
> 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.
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>>   lib/librte_eal/common/eal_common_memory.c     | 51 ++++++++++++++++---
>>   .../common/include/rte_eal_memconfig.h        |  1 +
>>   lib/librte_eal/common/malloc_heap.c           |  2 +-
>>   3 files changed, 47 insertions(+), 7 deletions(-)
>>
>> diff --git a/lib/librte_eal/common/eal_common_memory.c
>> b/lib/librte_eal/common/eal_common_memory.c
>> index 4f0688f9d..835bbffb6 100644
>> --- a/lib/librte_eal/common/eal_common_memory.c
>> +++ b/lib/librte_eal/common/eal_common_memory.c
>> @@ -24,6 +24,21 @@
>>   #include "eal_private.h"
>>   #include "eal_internal_cfg.h"
>>
>> +/* forward declarations for memseg walk functions. we support external
>> segments,
>> + * but for some functionality to work, we need to either skip or not skip
>> + * external segments. for example, while we expect for virt2memseg to
>> return a
>> + * valid memseg even though it's an external memseg, for regular memseg
>> walk we
>> + * want to skip those because the expectation is that we will only walk
>> the
>> + * DPDK allocated memory.
>> + */
>>
> 
> I do not clear understand when external segments can be used along with
> hugepages segments, but if this is a possibility, should not we support
> memseg walk for just external segments and also to allow any walk type as
> an API? If I'm right, it seems just memseg walk skipping external memsegs
> can be invoked from other files.

Well, now that i think of it, every walk function will receive a memseg 
list along with memseg itself, so user code can check to skip external 
memsegs. So yes, you're correct. I'll do that in the next iteration. 
Thanks for your feedback!

-- 
Thanks,
Anatoly

  reply	other threads:[~2018-07-10 11:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 13:17 [dpdk-dev] [RFC 00/11] Support externally allocated memory in DPDK Anatoly Burakov
2018-07-06 13:17 ` [dpdk-dev] [RFC 01/11] mem: allow memseg lists to be marked as external Anatoly Burakov
2018-07-10 11:18   ` Alejandro Lucero
2018-07-10 11:31     ` Burakov, Anatoly [this message]
2018-07-06 13:17 ` [dpdk-dev] [RFC 02/11] eal: add function to rerieve socket index by socket ID Anatoly Burakov
2018-07-10 13:03   ` Alejandro Lucero
2018-07-06 13:17 ` [dpdk-dev] [RFC 03/11] malloc: index heaps using heap ID rather than NUMA node Anatoly Burakov
2018-07-13 16:05   ` Alejandro Lucero
2018-07-13 16:08     ` Burakov, Anatoly
2018-07-06 13:17 ` [dpdk-dev] [RFC 04/11] malloc: add name to malloc heaps Anatoly Burakov
2018-07-13 16:09   ` Alejandro Lucero
2018-07-06 13:17 ` [dpdk-dev] [RFC 05/11] malloc: enable retrieving statistics from named heaps Anatoly Burakov
2018-07-13 16:25   ` Alejandro Lucero
2018-07-06 13:17 ` [dpdk-dev] [RFC 06/11] malloc: enable allocating " Anatoly Burakov
2018-07-13 16:31   ` Alejandro Lucero
2018-07-06 13:17 ` [dpdk-dev] [RFC 07/11] malloc: enable creating new malloc heaps Anatoly Burakov
2018-07-06 13:17 ` [dpdk-dev] [RFC 08/11] malloc: allow adding memory to named heaps Anatoly Burakov
2018-07-13 17:04   ` Alejandro Lucero
2018-07-06 13:17 ` [dpdk-dev] [RFC 09/11] malloc: allow removing memory from " Anatoly Burakov
2018-07-06 13:17 ` [dpdk-dev] [RFC 10/11] malloc: allow destroying heaps Anatoly Burakov
2018-07-06 13:17 ` [dpdk-dev] [RFC 11/11] memzone: enable reserving memory from named heaps Anatoly Burakov
2018-07-13 17:10 ` [dpdk-dev] [RFC 00/11] Support externally allocated memory in DPDK Burakov, Anatoly
2018-07-13 17:56   ` Wiles, Keith
2018-07-19 10:58     ` László Vadkerti
2018-07-26 13:48       ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f709746-0251-46a4-8823-dea3fb58cb69@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=alejandro.lucero@netronome.com \
    --cc=dev@dpdk.org \
    --cc=scott.branden@broadcom.com \
    --cc=srinath.mannam@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).