From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0139.outbound.protection.outlook.com [207.46.163.139]) by dpdk.org (Postfix) with ESMTP id 77B9D30D for ; Thu, 3 Jul 2014 20:09:15 +0200 (CEST) Received: from BL2PR05MB113.namprd05.prod.outlook.com (10.255.232.20) by BL2PR05MB113.namprd05.prod.outlook.com (10.255.232.20) with Microsoft SMTP Server (TLS) id 15.0.980.8; Thu, 3 Jul 2014 18:09:25 +0000 Received: from BL2PR05MB113.namprd05.prod.outlook.com ([169.254.1.179]) by BL2PR05MB113.namprd05.prod.outlook.com ([169.254.1.179]) with mapi id 15.00.0980.000; Thu, 3 Jul 2014 18:09:25 +0000 From: Anjali Kulkarni To: "Richardson, Bruce" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Question on huge pages and running DPDK apps inside containers Thread-Index: AQHPlunsfO0k4J2U00qji8nsE/hK/Q== Date: Thu, 3 Jul 2014 18:09:25 +0000 Message-ID: References: <59AF69C657FD0841A61C55336867B5B02CF13B78@IRSMSX103.ger.corp.intel.com> In-Reply-To: <59AF69C657FD0841A61C55336867B5B02CF13B78@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [66.129.239.11] x-microsoft-antispam: BCL:0;PCL:0;RULEID: x-forefront-prvs: 0261CCEEDF x-forefront-antispam-report: SFV:NSPM; SFS:(6009001)(13464003)(51704005)(24454002)(189002)(199002)(479174003)(377454003)(77096002)(86362001)(95666004)(77982001)(106356001)(81542001)(85306003)(83506001)(80022001)(81342001)(85806002)(74662001)(79102001)(83072002)(85852003)(92726001)(19580405001)(19580395003)(105586002)(83322001)(66066001)(46102001)(76482001)(31966008)(106116001)(87936001)(2656002)(99286002)(21056001)(101416001)(36756003)(107046002)(99396002)(20776003)(50986999)(64706001)(76176999)(74502001)(92566001)(54356999)(107886001)(14583001); DIR:OUT; SFP:; SCL:1; SRVR:BL2PR05MB113; H:BL2PR05MB113.namprd05.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; MX:3; LANG:en; Content-Type: text/plain; charset="us-ascii" Content-ID: <2FDF8A01C7BABD489A214457C242BCD9@namprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: juniper.net Subject: Re: [dpdk-dev] Question on huge pages and running DPDK apps inside containers 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: Thu, 03 Jul 2014 18:09:16 -0000 Richard, thanks. Looking at lxc-execute, I see this, which seems to be the key in running the applications created via lxc-create and those run lxc-execute: Note "lxc-execute is intended to run application containers that share the host's root file system, and not to run system containers that you create using lxc-create. Use lxc-start to run system containers." Anjali On 7/3/14 9:02 AM, "Richardson, Bruce" wrote: >Can you try deleting the hugepage files on the host before trying to run >the app in a container? > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anjali Kulkarni >> Sent: Thursday, July 03, 2014 7:41 AM >> To: dev@dpdk.org >> Subject: [dpdk-dev] Question on huge pages and running DPDK apps inside >> containers >>=20 >> Hi, >>=20 >> I am encountering a problem running DPDK apps inside containers, and >>need >> your help: >>=20 >> I create containers by doing: >>=20 >> lxc-create -t ubuntu -n fpc0 >> lxc-start -n fpc0 >>=20 >> (Reserve hugepages and follow all other steps to run the DPDK app on >>host) >>=20 >> Then run a standard dpdk app, on host, it works fine, inside container, >>it runs >> into this problem: >>=20 >> ubuntu@fpc0:/dpdk/x86_64-default-linuxapp-gcc/app$ ./testpmd -c f -n 4 >>-- -i >> rte_eal_init : 857 >> opt : 99 >> opt : 110 >> EAL: No free hugepages reported in hugepages-2048kB >> PANIC in rte_eal_init(): >> Cannot get hugepage information >> 6: [./testpmd() [0x402941]] >> 5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) >>[0x7f7f14f50ec5]] >> 4: [./testpmd() [0x40237e]] >> 3: [./testpmd() [0x478edb]] >> 2: [./testpmd() [0x4022ad]] >> 1: [./testpmd() [0x47e3c3]] >> Aborted >> ubuntu@fpc0:/dpdk/x86_64-default-linuxapp-gcc/app$ >>=20 >> However, running this same app on the host, or doing lxc-execute works. >>=20 >> While trying to debug my own dpdk app, I see that reading the same file >>for no >> of huge pages ( >>=20 >> /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages >>=20 >> ), on the host, its value is read 2048, while inside the container it >>is 0. This is >> same file. >> Also, if you cat the contents of this file, it is actually 0! >>(nr_hugepages is 2048, >> but the DPDK code does not read this file.) >>=20 >> cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages >> 0 >>=20 >>=20 >> In the below logs, the 2 prints "EAL: Using .." and "EAL: path ..." are >>added by me >> in DPDL eal library. >>=20 >> On host: >> rte_eal_init : 859 >> opt : 99 >> opt : 110 >> EAL: Using free_hugepages >> EAL: path /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages >> EAL: No of hugepages is 2048 >>=20 >> Inside container: >> pt : 99 >> opt : 110 >> EAL: Using free_hugepages >> EAL: path /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages >> EAL: No of hugepages is 0 >>=20 >>=20 >> Has anyone run into this problem and know what's the issue? >>=20 >> Anjali