From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1D36A3976 for ; Sun, 14 Sep 2014 13:07:27 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 14 Sep 2014 04:12:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,520,1406617200"; d="scan'208";a="591060790" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 14 Sep 2014 04:12:53 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 14 Sep 2014 04:12:53 -0700 Received: from cdsmsx101.ccr.corp.intel.com (172.17.3.36) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 14 Sep 2014 04:12:52 -0700 Received: from cdsmsx102.ccr.corp.intel.com ([169.254.2.14]) by CDSMSX101.ccr.corp.intel.com ([169.254.1.65]) with mapi id 14.03.0195.001; Sun, 14 Sep 2014 19:12:49 +0800 From: "Zhang, Jerry" To: jerry , "dev@dpdk.org" Thread-Topic: [dpdk-dev] l2fwd mmap memory failed Thread-Index: AQHPz/qHz86vwqT5rEmdikbwMqoS0pwAeAFA Date: Sun, 14 Sep 2014 11:12:49 +0000 Message-ID: References: <54155957.9000400@huawei.com> In-Reply-To: <54155957.9000400@huawei.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.6.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "luonengjun@huawei.com" Subject: Re: [dpdk-dev] l2fwd mmap memory failed 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: Sun, 14 Sep 2014 11:07:28 -0000 Hi, >-----Original Message----- >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of jerry >Sent: Sunday, September 14, 2014 5:01 PM >To: dev@dpdk.org >Cc: luonengjun@huawei.com >Subject: [dpdk-dev] l2fwd mmap memory failed > >Hi all, > >The l2fwd sample application starts failed in my environment with 90000 2M >hugepages set up. >It tells me that mmap failed: Cannot allocate memory. >Is there a limited max hugepages or memory size for dpdk to mmap EAL >memory? > >Some information as follows: > >1. Environment: >Host OS: Suse11 Sp3 x86_64 >NIC: intel 82599 >DPDK: 1.6.0r2 > >2. Hugepage Configuration in Kernel command line: >hugepagesz=3D2M default_hugepagesz=3D2M hugepages=3D90000 > >3. l2fwd command line: >./build/l2fwd -c 0x3 -n 3 --socket-mem 2048 -- -q 1 -p 3 > >4. cat /proc/meminfo: >HugePages_Total: 90000 >HugePages_Free: 90000 >HugePages_Rsvd: 0 >HugePages_Surp: 0 >Hugepagesize: 2048 kB > >5. Error messages in dpdk log: >Sun Sep 14 08:37:28 2014:EAL: Detected lcore 0 as core 0 on socket 0 Sun S= ep 14 >08:37:28 2014:EAL: Detected lcore 1 as core 1 on socket 0 Sun Sep 14 08:37= :28 >2014:EAL: Setting up memory... >Sun Sep 14 08:38:44 2014:EAL: map_all_hugepages(): mmap failed: Cannot >allocate memory Sun Sep 14 08:38:44 2014:EAL: Failed to mmap 2 MB >hugepages Sun Sep 14 08:38:44 2014:EAL: Cannot init memory Sun Sep 14 >08:38:44 2014:EAL: Error - exiting with code: 1 > Cause: Sun Sep 14 08:38:44 2014:Invalid EAL parameters > > >Anyone know the issue and the corresponding fix? Thanks. It's a system mmap failure.=20 As you have to map so many huge pages, I suggest that you check /proc/sys/v= m/max_map_count to see if the map count exceeds the max value.