From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DC8AD58F9 for ; Thu, 3 Jul 2014 16:54:12 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 03 Jul 2014 07:49:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,595,1400050800"; d="scan'208";a="538367648" Received: from fmsmsx106.amr.corp.intel.com ([10.19.9.37]) by orsmga001.jf.intel.com with ESMTP; 03 Jul 2014 07:54:21 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.19.9.29) by FMSMSX106.amr.corp.intel.com (10.19.9.37) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 3 Jul 2014 07:53:59 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.3.193]) by fmsmsx120.amr.corp.intel.com ([169.254.14.21]) with mapi id 14.03.0123.003; Thu, 3 Jul 2014 07:53:59 -0700 From: "Shaw, Jeffrey B" To: Anjali Kulkarni , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Question on huge pages and running DPDK apps inside containers Thread-Index: AQHPlszBwJhDaMaGz0qB84jVXin3iZuObwHA Date: Thu, 3 Jul 2014 14:53:58 +0000 Message-ID: <4032A54B6BB5F04B8C08B6CFF08C59285544C729@FMSMSX103.amr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 14:54:13 -0000 Do you know if the host's hugepages are mapped into the container? Seeing as containers are meant to provide isolation, it seems to make sense= that the host would not automatically share hugepages with a container, bu= t I'm not sure. Jeff -----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 con= tainers Hi, I am encountering a problem running DPDK apps inside containers, and need y= our help: I create containers by doing: lxc-create -t ubuntu -n fpc0 lxc-start -n fpc0 (Reserve hugepages and follow all other steps to run the DPDK app on host) Then run a standard dpdk app, on host, it works fine, inside container, it = runs into this problem: 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$ However, running this same app on the host, or doing lxc-execute works. While trying to debug my own dpdk app, I see that reading the same file for= no of huge pages ( /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages ), 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.) cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages 0 In the below logs, the 2 prints "EAL: Using .." and "EAL: path ..." are add= ed by me in DPDL eal library. 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 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 Has anyone run into this problem and know what's the issue? Anjali