DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Question on dpdk memory allocation.
@ 2018-08-29 20:20 Pradeep Fernando
  0 siblings, 0 replies; only message in thread
From: Pradeep Fernando @ 2018-08-29 20:20 UTC (permalink / raw)
  To: users

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-29 20:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 20:20 [dpdk-users] Question on dpdk memory allocation Pradeep Fernando

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).