From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.com (mout.gmx.com [74.208.4.201]) by dpdk.org (Postfix) with ESMTP id 127E02A9 for ; Fri, 24 Oct 2014 14:55:58 +0200 (CEST) Received: from [93.146.250.201] by 3capp-mailcom-lxa11.server.lan (via HTTP); Fri, 24 Oct 2014 15:04:26 +0200 MIME-Version: 1.0 Message-ID: From: "Mario Gianni" To: "Bruce Richardson" Content-Type: text/plain; charset=UTF-8 Date: Fri, 24 Oct 2014 15:04:26 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20141024120803.GA5804@BRICHA3-MOBL> References: , <20141024120803.GA5804@BRICHA3-MOBL> Content-Transfer-Encoding: quoted-printable X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K0:z7NJ8Iz7Pth72aD5An+maxj5K0olPoaxookZdA3Dw+V Po8CKc/7Ta/9gEmo+SNIWqbJ847/tHA80f0oqJjyvfjqdCU6Ju kvou3Tlk/JpTXjWh1TGJ/FWlZGv7JxfV0TgHaBcx0fBqSvUI3H XUFJophH6owcE7lY3YKg2oEwpljb2sGqTNUFocW30wSUMtuSlR K3gjwSOM7XjAnYMK6TzVsMDbI3dOxBJyhjBPPIPcUQC1/kU/RN sN6XF4aPp7y43uCxdpCv7dvECFTC13ax2GsLs4O/z+mtrpoeMr vxwqpVbmG51rEMoKXZTvzS0j/an X-UI-Out-Filterresults: notjunk:1; Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Cannot mmap device resource in DPDK 1.7.0 multi-process/multi-thread 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: Fri, 24 Oct 2014 12:55:58 -0000 Hi Bruce,=20 thank you for your answer, adding cores to the primary mask didn't help, i= nstead it helped manually passing the --base-virtaddr parameter, setting it= to the first value of Virtual Area that EAL finds when it starts the prima= ry process. =C2=A0 Honestly I don't understand why it works in this way, in the experimental = phase this could be a patch, but in the final program I have to automate th= is process, do you have any suggestions? For example is there a way to find the virtual area before starting the pr= imary process? =C2=A0 Mario =C2=A0 Sent:=C2=A0Friday, October 24, 2014 at 2:08 PM From:=C2=A0"Bruce Richardson" To:=C2=A0"Mario Gianni" Cc:=C2=A0dev@dpdk.org Subject:=C2=A0Re: [dpdk-dev] Cannot mmap device resource in DPDK 1.7.0 mul= ti-process/multi-thread On Fri, Oct 24, 2014 at 01:21:08PM +0200, Mario Gianni wrote: > Hi all, I have a problem since I updated to 1.7.0 version, > I got a multi-process, multi-threaded application, > In my application first I launch a master process, then I launch a secon= dary process with multiple threads in it > Well, when the number of lcores reserved for the secondary process excee= ds a certain number (eg. 4) i got an error in rte_eal_init() on the seconda= ry process when it tries to map PCI memory: > > EAL: pci_map_resource(): cannot mmap(12, 0x7ffff2e96000, 0x800000, 0x100= 0): Success (0x7ffff559b000) > EAL: Cannot mmap device resource > EAL: Error - exiting with code: 1 > Cause: Requested device 0000:01:00.0 cannot be used > > Can you help me? This could be because the additional memory/stack space used by the pthrea= ds for the cores in the secondary process is overlapping the space used in th= e primary process for hugepage or device memory. You could perhaps try addin= g a few cores to the primary process's coremask (and not using those cores) and see if it helps things. Alternatively there is a base-virtaddr parameter that can be passed to the primary process to try and adjust the starting address for it mapping memory. If you look at where it starts mapping memory right now, and then try hinting to it to maps the pages at a slightly higher or lower address and see if it helps. /Bruce