From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3B471B377 for ; Sat, 30 Aug 2014 16:18:02 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 30 Aug 2014 07:22:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,431,1406617200"; d="scan'208";a="595520827" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 30 Aug 2014 07:22:18 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.19.17.220) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 30 Aug 2014 07:22:18 -0700 Received: from cdsmsx151.ccr.corp.intel.com (172.17.4.38) by FMSMSX151.amr.corp.intel.com (10.19.17.220) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 30 Aug 2014 07:22:18 -0700 Received: from cdsmsx102.ccr.corp.intel.com ([169.254.2.168]) by CDSMSX151.ccr.corp.intel.com ([169.254.3.145]) with mapi id 14.03.0195.001; Sat, 30 Aug 2014 22:22:15 +0800 From: "Zhang, Jerry" To: zimeiw , "dev@dpdk.org" Thread-Topic: [dpdk-dev] rte_memzone: memzone_reserve_aligned_thread_unsafe failed when running two process at the same time. Thread-Index: AQHPw+A8Tb6OVQ7nX0m7Z75fa6ka/JvpLavg Date: Sat, 30 Aug 2014 14:22:15 +0000 Message-ID: References: <14f9ed02.118f5.1482414316f.Coremail.zimeiw@163.com> In-Reply-To: <14f9ed02.118f5.1482414316f.Coremail.zimeiw@163.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 Subject: Re: [dpdk-dev] rte_memzone: memzone_reserve_aligned_thread_unsafe failed when running two process at the same time. 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: Sat, 30 Aug 2014 14:18:03 -0000 Hi, 'memzone already exists' is not an error for the se= condary DPDK process. DPDK EAL initialization creates a mempool for log history. This mempoo= l creation includes creating a ring based on the memzone named RG_MP_log_hi= story. For the secondary DPDK process, if the mempool for log history creatio= n fails because the memzone RG_MP_log_history exits, it looks up the exited= mempool and reuse it.=20 Please refer to the implementation of rte_eal_common_log_init() functio= n. From the logs, it seems your secondary DPDK process has initialized suc= cessfully. =09 int rte_eal_common_log_init(FILE *default_log) { STAILQ_INIT(&log_history); /* reserve RTE_LOG_HISTORY*2 elements, so we can dump and * keep logging during this time */ log_history_mp =3D rte_mempool_create(LOG_HISTORY_MP_NAME, RTE_LOG_HISTORY= *2, LOG_ELT_SIZE, 0, 0, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0); =20 if ((log_history_mp =3D=3D NULL) &&=20 ((log_history_mp =3D rte_mempool_lookup(LOG_HISTORY_MP_NAME)) =3D=3D N= ULL)){ RTE_LOG(ERR, EAL, "%s(): cannot create log_history mempool\n", __func__); return -1; } default_log_stream =3D default_log; rte_openlog_stream(default_log); return 0; } -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of zimeiw Sent: Saturday, August 30, 2014 7:23 AM To: dev@dpdk.org Subject: [dpdk-dev] rte_memzone: memzone_reserve_aligned_thread_unsafe fail= ed when running two process at the same time. hi, Running primary process, it is successful. $ sudo ./simple_mp -c 1 -n 1 --socket-mem=3D64 --proc-type=3Dprimary EAL: Detected lcore 0 as core 0 on socket 0 EAL: Detected lcore 1 as core 0 on socket 0 EAL: Support maximum 64 logical core(s) by configuration. EAL: Detected 2 lcore(s) EAL: Setting up memory... EAL: Ask a virtual area of 0x26000000 bytes EAL: Virtual area found at 0x7fffd1200000 (size =3D 0x26000000) EAL: Ask a virtual area of 0x2200000 bytes EAL: Virtual area found at 0x7fffcee00000 (size =3D 0x2200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7fffcea00000 (size =3D 0x200000) EAL: Ask a virtual area of 0x1a00000 bytes EAL: Virtual area found at 0x7fffcce00000 (size =3D 0x1a00000) EAL: Ask a virtual area of 0x2200000 bytes EAL: Virtual area found at 0x7fffcaa00000 (size =3D 0x2200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7fffca600000 (size =3D 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7fffca200000 (size =3D 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7fffc9e00000 (size =3D 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7fffc9a00000 (size =3D 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7fffc9600000 (size =3D 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7fffc9200000 (size =3D 0x200000) EAL: Requesting 32 pages of size 2MB from socket 0 EAL: TSC frequency is ~2793683 KHz EAL: Master core 0 is ready (tid=3Df7fe4800) EAL: PCI device 0000:02:01.0 on NUMA socket -1 EAL: probe driver: 8086:100f rte_em_pmd EAL: 0000:02:01.0 not managed by UIO driver, skipping EAL: PCI device 0000:02:06.0 on NUMA socket -1 EAL: probe driver: 8086:100f rte_em_pmd EAL: 0000:02:06.0 not managed by UIO driver, skipping proc primary APP: Finished Process Init. simple_mp > Running secondary process, it is faied for memzone alre= ady exists. $ sudo ./simple_mp -c 1 -n 1 --proc-type=3Dsecondary --socket-mem=3D1 EAL: Detected lcore 0 as core 0 on socket 0 EAL: Detected lcore 1 as core 0 on socket 0 EAL: Support maximum 64 logical core(s) by configuration. EAL: Detected 2 lcore(s) EAL: Setting up memory... EAL: Analysing 358 files EAL: Mapped segment 0 of size 0x4000000 EAL: memzone_reserve_aligned_thread_unsafe(): memzone a= lready exists RING: Cannot reserve memory EAL: TSC frequency is ~2793681 KHz EAL: Master core 0 is ready (tid=3Df7fe4800) EAL: PCI device 0000:02:01.0 on NUMA socket -1 EAL: probe driver: 8086:100f rte_em_pmd EAL: Cannot find resource for device EAL: PCI device 0000:02:06.0 on NUMA socket -1 EAL: probe driver: 8086:100f rte_em_pmd EAL: Cannot find resource for device proc secandary APP: Finished Process Init. simple_mp >