From: Pradeep Fernando <pradeepfn@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] Question on dpdk memory allocation.
Date: Wed, 29 Aug 2018 16:20:14 -0400 [thread overview]
Message-ID: <CAPSEm=YV0sPKtV7YNr72OgaNq8BkqVaNz7XSobTAj-NETz2C4Q@mail.gmail.com> (raw)
Hi all,
My target software stack does not support hugetlbfs, but it supports
huge-paged mmaps. I'm trying to port dpdk huge-page allocate logic to use
mmap based allocations. Hence the below question. I use dpdk 16.11.1 (
slightly old i know :) )
I see that, there is
1. malloc based allocation
2. mmap over hugetlbfs allocation
in
https://github.com/pradeepfn/dpdk/blob/8af51192e564a0331896cd1594a830d92a228845/lib/librte_eal/linuxapp/eal/eal_memory.c#L962
The memory_zone allocator of dpdk uses physically contiguous memory
segments as described in -
https://doc.dpdk.org/guides/prog_guide/env_abstraction_layer.html#memory-segments-and-memory-zones-memzone
.
This explains why, huge-page mappings are stored in mem-segment structures
in virtual/physical contiguous blocks. -- after complex mapping/remapping
process.
But how does malloc allocation ( no_hugetlbfs) provides same guarantees. It
is virtually contiguous but not physically contiguous beyond 4KB. How does
malloc allocation works with memzone_allocator in that case?
thanks
--Pradeep
reply other threads:[~2018-08-29 20:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAPSEm=YV0sPKtV7YNr72OgaNq8BkqVaNz7XSobTAj-NETz2C4Q@mail.gmail.com' \
--to=pradeepfn@gmail.com \
--cc=users@dpdk.org \
/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).