DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Regarding rte_malloc and linux malloc
@ 2017-02-10  4:30 Sakthivel Subramaniam
  2017-02-10  5:01 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Sakthivel Subramaniam @ 2017-02-10  4:30 UTC (permalink / raw)
  To: users

Hi,
I have some basic doubt about DPDK memory allocation.
1. rte_malloc will allocate memory from hugepage memory ?
2. If we use normal malloc, this will be allocated from heap. will this
allocation also useful for dpdk?
3. Or for better performance we have to use only rte_malloc?

Please provide your inputs.

-- 
Thanks & Regards
Sakthivel S

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-users] Regarding rte_malloc and linux malloc
  2017-02-10  4:30 [dpdk-users] Regarding rte_malloc and linux malloc Sakthivel Subramaniam
@ 2017-02-10  5:01 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-02-10  5:01 UTC (permalink / raw)
  To: Sakthivel Subramaniam; +Cc: users

On Fri, 10 Feb 2017 10:00:33 +0530
Sakthivel Subramaniam <sakthivelpvs@gmail.com> wrote:

> Hi,
> I have some basic doubt about DPDK memory allocation.
> 1. rte_malloc will allocate memory from hugepage memory ?

yes. but remember hugepage memory is limited

> 2. If we use normal malloc, this will be allocated from heap. will this
> allocation also useful for dpdk?

DPDK primary application can use it but you can't pass that memory
to a secondary DPDK process. Also you can't use malloc memory for things
that get DMA'd like packet buffers.

> 3. Or for better performance we have to use only rte_malloc?
The memory from rte_malloc will cause less TLB misses, but on a modern
processor for a small resident set size it probably makes no difference.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-10  5:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10  4:30 [dpdk-users] Regarding rte_malloc and linux malloc Sakthivel Subramaniam
2017-02-10  5:01 ` Stephen Hemminger

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