DPDK patches and discussions
 help / color / mirror / Atom feed
From: Mauro Annarumma <mauroannarumma@hotmail.it>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Question on DPDK multi-process support
Date: Tue, 18 Feb 2014 13:45:58 +0100	[thread overview]
Message-ID: <DUB111-W121193D81181E4012B5F94CB1980@phx.gbl> (raw)
In-Reply-To: <59AF69C657FD0841A61C55336867B5B01A99D070@IRSMSX103.ger.corp.intel.com>

Hi Bruce,
   just for dispel
 any doubt: if there is one primary process and N secondary processes, 
and each process uses only one logical core (they have a coremask equal 
to 0x01, 0x02, 0x04, ....), I can run at the same time at most "my CPU logical cores - 1" secondary processes. Is it right? 
Is it true also if I disable the mempool per-core cache?

Thanks for your help, regards.

Mauro

> From: bruce.richardson@intel.com
> To: mauroannarumma@hotmail.it; dev@dpdk.org
> Subject: RE: [dpdk-dev] Question on DPDK multi-process support
> Date: Mon, 17 Feb 2014 16:44:55 +0000
> 
> > Hi,
> > I have some doubts on the DPDK multi-process support:
> > 
> > 1) According to the Programmers Guide (pag. 109 - 20.3 Multi-process
> > Limitations), one of the multi-process limitations is:
> > 
> > "All Intel(r) DPDK processes running as a single application and using shared
> > memory must have distinct coremask arguments. It is not possible to have
> > a primary and secondary instance, or two secondary instances, using any of
> > the same logical cores. Attempting to do so can cause corruption of
> > memory pool caches, among other issues."
> > 
> > Does it mean that I can run a number of DPDK processes at most equal to
> > the number of my CPU logical cores? In the case I run 2 mono-lcore DPDK
> > processes with the same coremask, what are the possible issues?
> > 
> The potential issues are caused by a dependence on the lcore_id internally by Intel DPDK data structures, especially mempools. If two processes use the same lcore they will have the same lcore_id value, and will try and access the same mempool cache which is not thread-safe. This will cause mempool corruption.
> NOTE: this applies only to co-operating processes, i.e. those run as primary and secondary processes. There are no mempool issues with running completely independent Intel DPDK processes on the same cores, i.e. processes run using different "--file-prefix=" parameters, since those do not share any memory and data structures. 
> 
> > 
> > 2) Can a secondary process use the rte_eth_rx_burst over a queue of a NIC
> > port configured in the primary process?
> > 
> Yes. NIC ports and their data structures are shared between co-operating processes. Multiple processes doing RX on the same port is shown in the "examples/multi_process/symmetric_mp" example application.
 		 	   		  

  reply	other threads:[~2014-02-18 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 15:48 Mauro Annarumma
2014-02-17 16:44 ` Richardson, Bruce
2014-02-18 12:45   ` Mauro Annarumma [this message]
2014-02-18 12:53     ` Richardson, Bruce
2014-02-18 13:14     ` [dpdk-dev] Receive queue full François-Frédéric Ozog

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=DUB111-W121193D81181E4012B5F94CB1980@phx.gbl \
    --to=mauroannarumma@hotmail.it \
    --cc=dev@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).