DPDK patches and discussions
 help / color / mirror / Atom feed
From: Suanming Mou <suanmingm@mellanox.com>
To: Matan Azrad <matan@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>,
	Ori Kam <orika@mellanox.com>
Cc: dev@dpdk.org, rasland@mellanox.com
Subject: [dpdk-dev] [RFC] net/mlx5: add sys_mem_en devarg
Date: Fri, 5 Jun 2020 11:06:45 +0800	[thread overview]
Message-ID: <3210893d-13c8-d3e6-9ada-0db2e2165307@mellanox.com> (raw)

Currently, for MLX5 PMD, once millions of flows created, the memory 
consumption of the flows are also very huge.
For the system with limited memory, it means the system need to reserve 
most of the memory as huge page memory to serve the flows in advance.
And other normal applications will have no chance to use this reserved 
memory any more.
While most of the time, the system will not have lots of flows, the 
reserved huge page memory becomes a bit waste of memory at most of the time.

One solution maybe not to use the huge page memory for the DPDK 
application, but in this case it hurts the datapath performance.
Since the flows memory is just for the control path, allocate the memory 
from system will only affects the flow insertion rate, so the other 
solution becomes provide a new option which allows flows allocated 
memory from the system memory.
In this case, for the system with limited memory with this option, it 
gets a balance with the huge page memory consumption and datapath 
performance not be hurted.

This feature will add a new devarg for MLX5 PMD which calls 
"sys_mem_en". With this devarg set to be true, the system memory 
allocate functions will be registered for flow objects memory allocate.
The "sys_mem_en" devarg can be set to 0 or 1.
0 means the flow objects will allocate from rte memory.
1 means the flow objects will allocate from system memory.
The sample configuration as below:
./testpmd -n 4  -w 0000:d8:00.0,sys_mem_en=1 -- --burst=64 --mbcache=512 
-i  --nb-cores=7

For DPDK application without this devarg set, it is same with 
"sys_mem_en=0", the default memory allocator for flow objects will still 
be the default DPDK rte memory allocator.


Thanks,

SuanmingMou


                 reply	other threads:[~2020-06-05  3:07 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=3210893d-13c8-d3e6-9ada-0db2e2165307@mellanox.com \
    --to=suanmingm@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=viacheslavo@mellanox.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).