From patchwork Thu Jul 2 10:57:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 72822 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FA00A0520; Thu, 2 Jul 2020 12:57:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11EB01D95E; Thu, 2 Jul 2020 12:57:39 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EA4791D6F3 for ; Thu, 2 Jul 2020 12:57:36 +0200 (CEST) IronPort-SDR: l3yDDOsJyA9fMXjR12I4qC/ZWC+VNV//7WBX06PBEI0DyQGygnNC7TM9MdTyETlrIW93fahK+S k2CZquZ1TK3A== X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="146859460" X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="146859460" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2020 03:57:35 -0700 IronPort-SDR: Zf7afBMfg4vTSsy5jMkGUlX4vfGYBG2gN2IHUUrCyet+78+U++SbBk5TLEzVFOKKbv5yVStSVm zbtFH1kCM67Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="321495987" Received: from silpixa00399126.ir.intel.com ([10.237.222.84]) by FMSMGA003.fm.intel.com with ESMTP; 02 Jul 2020 03:57:35 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , anatoly.burakov@intel.com Date: Thu, 2 Jul 2020 11:57:21 +0100 Message-Id: <20200702105721.1044076-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When building with meson, the default size of virtual address space reserved for mapping pages was globally set at 512GB, which is too big for use in 32-bit processes. To match the behaviour with "make", we configure this to be 512GB for 64-bit and 2MB for 32-bit builds. Bugzilla ID: 498 Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Cc: anatoly.burakov@intel.com Signed-off-by: Bruce Richardson Tested-by: Ferruh Yigit --- config/meson.build | 6 ++++++ config/rte_config.h | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 351e268c1..72fdabff2 100644 --- a/config/meson.build +++ b/config/meson.build @@ -238,6 +238,12 @@ dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp')) dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64) dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true) +if dpdk_conf.get('RTE_ARCH_64') + dpdk_conf.set('RTE_MAX_MEM_MB', 524288) +else +# for 32-bits we need smaller reserved memory areas + dpdk_conf.set('RTE_MAX_MEM_MB', 2048) +endif compile_time_cpuflags = [] diff --git a/config/rte_config.h b/config/rte_config.h index e9201fd46..086acf74a 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -38,7 +38,6 @@ #define RTE_MAX_MEM_MB_PER_LIST 32768 #define RTE_MAX_MEMSEG_PER_TYPE 32768 #define RTE_MAX_MEM_MB_PER_TYPE 65536 -#define RTE_MAX_MEM_MB 524288 #define RTE_MAX_MEMZONE 2560 #define RTE_MAX_TAILQ 32 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO