From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dub0-omc4-s3.dub0.hotmail.com (dub0-omc4-s3.dub0.hotmail.com [157.55.2.78]) by dpdk.org (Postfix) with ESMTP id AC3E468C8 for ; Tue, 18 Feb 2014 13:44:33 +0100 (CET) Received: from DUB111-W121 ([157.55.2.71]) by dub0-omc4-s3.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 18 Feb 2014 04:45:58 -0800 X-TMN: [Mvlavj76poikWxRcnHrzkJvKIwOAlXnR4eknsC5WNwY=] X-Originating-Email: [mauroannarumma@hotmail.it] Message-ID: From: Mauro Annarumma To: "dev@dpdk.org" Date: Tue, 18 Feb 2014 13:45:58 +0100 Importance: Normal In-Reply-To: <59AF69C657FD0841A61C55336867B5B01A99D070@IRSMSX103.ger.corp.intel.com> References: , <59AF69C657FD0841A61C55336867B5B01A99D070@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 X-OriginalArrivalTime: 18 Feb 2014 12:45:58.0803 (UTC) FILETIME=[5F5B8E30:01CF2CA7] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Question on DPDK multi-process support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2014 12:44:33 -0000 Hi Bruce=2C just for dispel=0A= any doubt: if there is one primary process and N secondary processes=2C = =0A= and each process uses only one logical core (they have a coremask equal =0A= to 0x01=2C 0x02=2C 0x04=2C ....)=2C I can run at the same time at most "my = CPU logical cores - 1" secondary processes. Is it right?=20 Is it true also if I disable the mempool per-core cache? Thanks for your help=2C regards. Mauro > From: bruce.richardson@intel.com > To: mauroannarumma@hotmail.it=3B dev@dpdk.org > Subject: RE: [dpdk-dev] Question on DPDK multi-process support > Date: Mon=2C 17 Feb 2014 16:44:55 +0000 >=20 > > Hi=2C > > I have some doubts on the DPDK multi-process support: > >=20 > > 1) According to the Programmers Guide (pag. 109 - 20.3 Multi-process > > Limitations)=2C one of the multi-process limitations is: > >=20 > > "All Intel(r) DPDK processes running as a single application and using = shared > > memory must have distinct coremask arguments. It is not possible to hav= e > > a primary and secondary instance=2C or two secondary instances=2C using= any of > > the same logical cores. Attempting to do so can cause corruption of > > memory pool caches=2C among other issues." > >=20 > > 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=2C what are the possible issues? > >=20 > The potential issues are caused by a dependence on the lcore_id internall= y by Intel DPDK data structures=2C especially mempools. If two processes us= e the same lcore they will have the same lcore_id value=2C and will try and= access the same mempool cache which is not thread-safe. This will cause me= mpool corruption. > NOTE: this applies only to co-operating processes=2C i.e. those run as pr= imary and secondary processes. There are no mempool issues with running com= pletely independent Intel DPDK processes on the same cores=2C i.e. processe= s run using different "--file-prefix=3D" parameters=2C since those do not s= hare any memory and data structures.=20 >=20 > >=20 > > 2) Can a secondary process use the rte_eth_rx_burst over a queue of a N= IC > > port configured in the primary process? > >=20 > 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 "ex= amples/multi_process/symmetric_mp" example application. =