From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 848CF2C8 for ; Thu, 29 Jun 2017 08:08:41 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OSA004JYP2HD110@mailout1.w1.samsung.com> for dev@dpdk.org; Thu, 29 Jun 2017 07:08:41 +0100 (BST) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170629060840eucas1p2c7a22d92a2f15a3564465eee93e041d8~MgrwNqaI42126421264eucas1p2a; Thu, 29 Jun 2017 06:08:40 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1.samsung.com (EUCPMTA) with SMTP id A2.F7.14140.A6994595; Thu, 29 Jun 2017 07:08:42 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170629060839eucas1p11d1b50900eba41695d30ebb216b7a909~MgrvezEgV0561405614eucas1p1a; Thu, 29 Jun 2017 06:08:39 +0000 (GMT) X-AuditID: cbfec7ef-f796a6d00000373c-71-5954996ae038 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A2.45.20206.76994595; Thu, 29 Jun 2017 07:08:39 +0100 (BST) Received: from [106.109.129.180] by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OSA00C6HP2CS350@eusync3.samsung.com>; Thu, 29 Jun 2017 07:08:39 +0100 (BST) To: Hemant Agrawal , dev@dpdk.org, David Marchand , Sergio Gonzalez Monroy , Thomas Monjalon Cc: Heetae Ahn , Yuanhan Liu , Jianfeng Tan , Neil Horman , Yulong Pei , Bruce Richardson , Jerin Jacob From: Ilya Maximets Message-id: <29378009-05d1-954b-fb20-edc84269c378@samsung.com> Date: Thu, 29 Jun 2017 09:08:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-version: 1.0 In-reply-to: <48da8415-8fa0-b8f4-0b0d-0965d8fb1315@samsung.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCKsWRmVeSWpSXmKPExsWy7djPc7pZM0MiDa7ukbS4screYkVHO4vF u0/bmSymfb7NbrHy8UY2iyvtP9ktJk4yseie/YXN4lbzSTaLFROOMFp8enCCxaJlyU4mi28P vjM78Hpc7L/D6LHhRD+rx68FS1k9bvy7xeaxeM9LJo9jN6exe2x8t4PJo2/LKkaPK99XMwZw RnHZpKTmZJalFunbJXBlLL+9jq3gW0HF0fufWRsY1wV1MXJySAiYSGx5NYEFwhaTuHBvPVsX IxeHkMAyRoldyyazQjifGSVevb/ABNPRtucdI1zVlQtHmCGcF4wShy+cYAapEhZwlFg2/SLY LBGBU4wSt4+/BmthFpjPJPGz9wcrSBWbgI7EqdVHgBIcHLwCdhLrdiWDhFkEVCXWnP8JNkhU IELi+pwtjCA2r4CgxI/J98CO5RSwlzj95TTYGGYBA4kZUw4zQdjyEpvXvGWGOPUnu8SXx4kg 4yUEZCU2HYAKu0hM/PwG6hthiVfHt7BD2DISlyd3s4CcKSHQzCjRsOoSI4QzgVHiS/NyqA57 iVM3r0It45OYtG06M8QCXomONiGIEg+J08teQgPVUWJnYx80UH8xSZy+fIZxAqP8LCT/zELy wywkPyxgZF7FKJJaWpybnlpsqFecmFtcmpeul5yfu4kRmLZO/zv+fgfj0+aQQ4wCHIxKPLwM a4MjhVgTy4orcw8xSnAwK4nwujeERArxpiRWVqUW5ccXleakFh9ilOZgURLn5T11LUJIID2x JDU7NbUgtQgmy8TBKdXAOOlvQNDchL3tSr4Xnlkc8/t/ysU5VpXniH5Ps9h1/ZyWKwYsV1M+ zp69c32fF+epoykv3JqUlupxvyza03PussqNc2abhVsaD4XPMioWdZt9NFDt4zm7u15Peew4 WPil5KLOTLzdJiT0wL5VOoFhb1LBzDXsIWoO7360fay+Wv3Ot7pZ5b+WEktxRqKhFnNRcSIA t+6eslcDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsVy+t/xq7rpM0MiDS5u4bS4screYkVHO4vF u0/bmSymfb7NbrHy8UY2iyvtP9ktJk4yseie/YXN4lbzSTaLFROOMFp8enCCxaJlyU4mi28P vjM78Hpc7L/D6LHhRD+rx68FS1k9bvy7xeaxeM9LJo9jN6exe2x8t4PJo2/LKkaPK99XMwZw RrnZZKQmpqQWKaTmJeenZOal2yqFhrjpWigp5CXmptoqRej6hgQpKZQl5pQCeUYGaMDBOcA9 WEnfLsEtY/ntdWwF3woqjt7/zNrAuC6oi5GTQ0LARKJtzztGCFtM4sK99WxdjFwcQgJLGCXu HNzGBOG8YJQ4+2cvC0iVsICjxLLpF8GqRATOMErs6XzKAlH1i0li6bI3rCAOs8BCJonGPZuY QFrYBHQkTq0+ArSEg4NXwE5i3a5kkDCLgKrEmvM/mUFsUYEIiYedu9hBbF4BQYkfk++BbeMU sJc4/eU0K0grs4CexP2LWiBhZgF5ic1r3jJPYBSYhaRjFkLVLCRVCxiZVzGKpJYW56bnFhvp FSfmFpfmpesl5+duYgTG77ZjP7fsYOx6F3yIUYCDUYmHl2FtcKQQa2JZcWXuIUYJDmYlEV73 hpBIId6UxMqq1KL8+KLSnNTiQ4ymQC9MZJYSTc4Hppa8knhDE0NzS0MjYwsLcyMjJXHeqR+u hAsJpCeWpGanphakFsH0MXFwSjUwetjdK2XdIpr+0XFeqaNZ9fLyV14z1t37E1eV5t5/7ZaA 1P6/Ruqr7Di+yl0XSoqZEqb5TX/l9E8pZ6o25uyumiC4wcfs++5rp9KnrrPSK/zIr9rx8Vis 6/RXT3bm2aQbyLG0y5RcPdnREN16a34Fc8Rt3bZ7wsl8c+/cnMRp4Bbcs3xefE6JEktxRqKh FnNRcSIAkMSsU/UCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170629060839eucas1p11d1b50900eba41695d30ebb216b7a909 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?SWx5YSBNYXhpbWV0cxtTUlItVmlydHVhbGl6YXRpb24gTGFi?= =?UTF-8?B?G+yCvOyEseyghOyekBtMZWFkaW5nIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?SWx5YSBNYXhpbWV0cxtTUlItVmlydHVhbGl6YXRpb24gTGFi?= =?UTF-8?B?G1NhbXN1bmcgRWxlY3Ryb25pY3MbTGVhZGluZyBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0NJU0hRG0MxMEdEMDFHRDAxMDE1NA==?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170627102451eucas1p2254d8679f70e261b9db9d2123aa80091 X-RootMTR: 20170627102451eucas1p2254d8679f70e261b9db9d2123aa80091 References: <1498553186-24541-1-git-send-email-i.maximets@samsung.com> <1498559080-27331-1-git-send-email-i.maximets@samsung.com> <1498559080-27331-2-git-send-email-i.maximets@samsung.com> <48da8415-8fa0-b8f4-0b0d-0965d8fb1315@samsung.com> Subject: Re: [dpdk-dev] [PATCH v9 1/2] mem: balanced allocation of hugepages 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: , X-List-Received-Date: Thu, 29 Jun 2017 06:08:41 -0000 On 29.06.2017 08:48, Ilya Maximets wrote: > On 29.06.2017 08:32, Hemant Agrawal wrote: >> On 6/27/2017 3:54 PM, Ilya Maximets wrote: >>> Currently EAL allocates hugepages one by one not paying attention >>> from which NUMA node allocation was done. >>> >>> Such behaviour leads to allocation failure if number of available >>> hugepages for application limited by cgroups or hugetlbfs and >>> memory requested not only from the first socket. >>> >>> Example: >>> # 90 x 1GB hugepages availavle in a system >>> >>> cgcreate -g hugetlb:/test >>> # Limit to 32GB of hugepages >>> cgset -r hugetlb.1GB.limit_in_bytes=34359738368 test >>> # Request 4GB from each of 2 sockets >>> cgexec -g hugetlb:test testpmd --socket-mem=4096,4096 ... >>> >>> EAL: SIGBUS: Cannot mmap more hugepages of size 1024 MB >>> EAL: 32 not 90 hugepages of size 1024 MB allocated >>> EAL: Not enough memory available on socket 1! >>> Requested: 4096MB, available: 0MB >>> PANIC in rte_eal_init(): >>> Cannot init memory >>> >>> This happens beacause all allocated pages are >>> on socket 0. >>> >>> Fix this issue by setting mempolicy MPOL_PREFERRED for each hugepage >>> to one of requested nodes using following schema: >>> >>> 1) Allocate essential hugepages: >>> 1.1) Allocate as many hugepages from numa N to >>> only fit requested memory for this numa. >>> 1.2) repeat 1.1 for all numa nodes. >>> 2) Try to map all remaining free hugepages in a round-robin >>> fashion. >>> 3) Sort pages and choose the most suitable. >>> >>> In this case all essential memory will be allocated and all remaining >>> pages will be fairly distributed between all requested nodes. >>> >>> New config option RTE_EAL_NUMA_AWARE_HUGEPAGES introduced and >>> enabled by default for linuxapp except armv7 and dpaa2. >>> Enabling of this option adds libnuma as a dependency for EAL. >>> >>> Fixes: 77988fc08dc5 ("mem: fix allocating all free hugepages") >>> >>> Signed-off-by: Ilya Maximets >>> --- >>> config/common_base | 1 + >>> config/common_linuxapp | 1 + >>> config/defconfig_arm-armv7a-linuxapp-gcc | 3 + >>> config/defconfig_arm64-dpaa2-linuxapp-gcc | 3 + >>> lib/librte_eal/linuxapp/eal/Makefile | 3 + >>> lib/librte_eal/linuxapp/eal/eal_memory.c | 120 ++++++++++++++++++++++++++++-- >>> mk/rte.app.mk | 3 + >>> 7 files changed, 126 insertions(+), 8 deletions(-) >>> >>> diff --git a/config/common_base b/config/common_base >>> index f6aafd1..660588a 100644 >>> --- a/config/common_base >>> +++ b/config/common_base >>> @@ -103,6 +103,7 @@ CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n >>> CONFIG_RTE_EAL_IGB_UIO=n >>> CONFIG_RTE_EAL_VFIO=n >>> CONFIG_RTE_MALLOC_DEBUG=n >>> +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n >>> >>> # >>> # Recognize/ignore the AVX/AVX512 CPU flags for performance/power testing. >>> diff --git a/config/common_linuxapp b/config/common_linuxapp >>> index b3cf41b..64bef87 100644 >>> --- a/config/common_linuxapp >>> +++ b/config/common_linuxapp >>> @@ -35,6 +35,7 @@ >>> CONFIG_RTE_EXEC_ENV="linuxapp" >>> CONFIG_RTE_EXEC_ENV_LINUXAPP=y >>> >>> +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y >>> CONFIG_RTE_EAL_IGB_UIO=y >>> CONFIG_RTE_EAL_VFIO=y >>> CONFIG_RTE_KNI_KMOD=y >>> diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc >>> index 19607eb..e06b1d4 100644 >>> --- a/config/defconfig_arm-armv7a-linuxapp-gcc >>> +++ b/config/defconfig_arm-armv7a-linuxapp-gcc >>> @@ -47,6 +47,9 @@ CONFIG_RTE_ARCH_STRICT_ALIGN=y >>> CONFIG_RTE_TOOLCHAIN="gcc" >>> CONFIG_RTE_TOOLCHAIN_GCC=y >>> >>> +# NUMA is not supported on ARM >>> +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n >>> + >>> # ARM doesn't have support for vmware TSC map >>> CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=n >>> >>> diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc >>> index 2304ab6..f78449d 100644 >>> --- a/config/defconfig_arm64-dpaa2-linuxapp-gcc >>> +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc >>> @@ -45,6 +45,9 @@ CONFIG_RTE_CACHE_LINE_SIZE=64 >>> >>> CONFIG_RTE_PKTMBUF_HEADROOM=256 >>> >>> +# Doesn't support NUMA >>> +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y >>> + >> >> DPAA2 does not support NUMA so, >> CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n > > Oh, sorry. Just typo. > Thanks for catching this. Fixed. Hemant, please, check the new version (v10). > Sergio, I'll send v10 with only this change and will keep your > acked-by because the change is trivial. > >>> # >>> # Compile Support Libraries for DPAA2 >>> # >>> diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile >>> index 640afd0..8651e27 100644 >>> --- a/lib/librte_eal/linuxapp/eal/Makefile >>> +++ b/lib/librte_eal/linuxapp/eal/Makefile >>> @@ -50,6 +50,9 @@ LDLIBS += -ldl >>> LDLIBS += -lpthread >>> LDLIBS += -lgcc_s >>> LDLIBS += -lrt >>> +ifeq ($(CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES),y) >>> +LDLIBS += -lnuma >>> +endif >>> >>> # specific to linuxapp exec-env >>> SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) := eal.c >>> diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c >>> index e17c9cb..647d89c 100644 >>> --- a/lib/librte_eal/linuxapp/eal/eal_memory.c >>> +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c >>> @@ -54,6 +54,10 @@ >>> #include >>> #include >>> #include >>> +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES >>> +#include >>> +#include >>> +#endif >>> >>> #include >>> #include >>> @@ -348,6 +352,14 @@ static int huge_wrap_sigsetjmp(void) >>> return sigsetjmp(huge_jmpenv, 1); >>> } >>> >>> +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES >>> +/* Callback for numa library. */ >>> +void numa_error(char *where) >>> +{ >>> + RTE_LOG(ERR, EAL, "%s failed: %s\n", where, strerror(errno)); >>> +} >>> +#endif >>> + >>> /* >>> * Mmap all hugepages of hugepage table: it first open a file in >>> * hugetlbfs, then mmap() hugepage_sz data in it. If orig is set, the >>> @@ -356,18 +368,78 @@ static int huge_wrap_sigsetjmp(void) >>> * map continguous physical blocks in contiguous virtual blocks. >>> */ >>> static unsigned >>> -map_all_hugepages(struct hugepage_file *hugepg_tbl, >>> - struct hugepage_info *hpi, int orig) >>> +map_all_hugepages(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi, >>> + uint64_t *essential_memory __rte_unused, int orig) >>> { >>> int fd; >>> unsigned i; >>> void *virtaddr; >>> void *vma_addr = NULL; >>> size_t vma_len = 0; >>> +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES >>> + int node_id = -1; >>> + int essential_prev = 0; >>> + int oldpolicy; >>> + struct bitmask *oldmask = numa_allocate_nodemask(); >>> + bool have_numa = true; >>> + unsigned long maxnode = 0; >>> + >>> + /* Check if kernel supports NUMA. */ >>> + if (numa_available() != 0) { >>> + RTE_LOG(DEBUG, EAL, "NUMA is not supported.\n"); >>> + have_numa = false; >>> + } >>> + >>> + if (orig && have_numa) { >>> + RTE_LOG(DEBUG, EAL, "Trying to obtain current memory policy.\n"); >>> + if (get_mempolicy(&oldpolicy, oldmask->maskp, >>> + oldmask->size + 1, 0, 0) < 0) { >>> + RTE_LOG(ERR, EAL, >>> + "Failed to get current mempolicy: %s. " >>> + "Assuming MPOL_DEFAULT.\n", strerror(errno)); >>> + oldpolicy = MPOL_DEFAULT; >>> + } >>> + for (i = 0; i < RTE_MAX_NUMA_NODES; i++) >>> + if (internal_config.socket_mem[i]) >>> + maxnode = i + 1; >>> + } >>> +#endif >>> >>> for (i = 0; i < hpi->num_pages[0]; i++) { >>> uint64_t hugepage_sz = hpi->hugepage_sz; >>> >>> +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES >>> + if (maxnode) { >>> + unsigned int j; >>> + >>> + for (j = 0; j < maxnode; j++) >>> + if (essential_memory[j]) >>> + break; >>> + >>> + if (j == maxnode) { >>> + node_id = (node_id + 1) % maxnode; >>> + while (!internal_config.socket_mem[node_id]) { >>> + node_id++; >>> + node_id %= maxnode; >>> + } >>> + essential_prev = 0; >>> + } else { >>> + node_id = j; >>> + essential_prev = essential_memory[j]; >>> + >>> + if (essential_memory[j] < hugepage_sz) >>> + essential_memory[j] = 0; >>> + else >>> + essential_memory[j] -= hugepage_sz; >>> + } >>> + >>> + RTE_LOG(DEBUG, EAL, >>> + "Setting policy MPOL_PREFERRED for socket %d\n", >>> + node_id); >>> + numa_set_preferred(node_id); >>> + } >>> +#endif >>> + >>> if (orig) { >>> hugepg_tbl[i].file_id = i; >>> hugepg_tbl[i].size = hugepage_sz; >>> @@ -422,7 +494,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, >>> if (fd < 0) { >>> RTE_LOG(DEBUG, EAL, "%s(): open failed: %s\n", __func__, >>> strerror(errno)); >>> - return i; >>> + goto out; >>> } >>> >>> /* map the segment, and populate page tables, >>> @@ -433,7 +505,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, >>> RTE_LOG(DEBUG, EAL, "%s(): mmap failed: %s\n", __func__, >>> strerror(errno)); >>> close(fd); >>> - return i; >>> + goto out; >>> } >>> >>> if (orig) { >>> @@ -458,7 +530,12 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, >>> munmap(virtaddr, hugepage_sz); >>> close(fd); >>> unlink(hugepg_tbl[i].filepath); >>> - return i; >>> +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES >>> + if (maxnode) >>> + essential_memory[node_id] = >>> + essential_prev; >>> +#endif >>> + goto out; >>> } >>> *(int *)virtaddr = 0; >>> } >>> @@ -469,7 +546,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, >>> RTE_LOG(DEBUG, EAL, "%s(): Locking file failed:%s \n", >>> __func__, strerror(errno)); >>> close(fd); >>> - return i; >>> + goto out; >>> } >>> >>> close(fd); >>> @@ -478,6 +555,22 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, >>> vma_len -= hugepage_sz; >>> } >>> >>> +out: >>> +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES >>> + if (maxnode) { >>> + RTE_LOG(DEBUG, EAL, >>> + "Restoring previous memory policy: %d\n", oldpolicy); >>> + if (oldpolicy == MPOL_DEFAULT) { >>> + numa_set_localalloc(); >>> + } else if (set_mempolicy(oldpolicy, oldmask->maskp, >>> + oldmask->size + 1) < 0) { >>> + RTE_LOG(ERR, EAL, "Failed to restore mempolicy: %s\n", >>> + strerror(errno)); >>> + numa_set_localalloc(); >>> + } >>> + } >>> + numa_free_cpumask(oldmask); >>> +#endif >>> return i; >>> } >>> >>> @@ -562,6 +655,11 @@ find_numasocket(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi) >>> if (hugepg_tbl[i].orig_va == va) { >>> hugepg_tbl[i].socket_id = socket_id; >>> hp_count++; >>> +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES >>> + RTE_LOG(DEBUG, EAL, >>> + "Hugepage %s is on socket %d\n", >>> + hugepg_tbl[i].filepath, socket_id); >>> +#endif >>> } >>> } >>> } >>> @@ -1000,6 +1098,11 @@ rte_eal_hugepage_init(void) >>> >>> huge_register_sigbus(); >>> >>> + /* make a copy of socket_mem, needed for balanced allocation. */ >>> + for (i = 0; i < RTE_MAX_NUMA_NODES; i++) >>> + memory[i] = internal_config.socket_mem[i]; >>> + >>> + >>> /* map all hugepages and sort them */ >>> for (i = 0; i < (int)internal_config.num_hugepage_sizes; i ++){ >>> unsigned pages_old, pages_new; >>> @@ -1017,7 +1120,8 @@ rte_eal_hugepage_init(void) >>> >>> /* map all hugepages available */ >>> pages_old = hpi->num_pages[0]; >>> - pages_new = map_all_hugepages(&tmp_hp[hp_offset], hpi, 1); >>> + pages_new = map_all_hugepages(&tmp_hp[hp_offset], hpi, >>> + memory, 1); >>> if (pages_new < pages_old) { >>> RTE_LOG(DEBUG, EAL, >>> "%d not %d hugepages of size %u MB allocated\n", >>> @@ -1060,7 +1164,7 @@ rte_eal_hugepage_init(void) >>> sizeof(struct hugepage_file), cmp_physaddr); >>> >>> /* remap all hugepages */ >>> - if (map_all_hugepages(&tmp_hp[hp_offset], hpi, 0) != >>> + if (map_all_hugepages(&tmp_hp[hp_offset], hpi, NULL, 0) != >>> hpi->num_pages[0]) { >>> RTE_LOG(ERR, EAL, "Failed to remap %u MB pages\n", >>> (unsigned)(hpi->hugepage_sz / 0x100000)); >>> diff --git a/mk/rte.app.mk b/mk/rte.app.mk >>> index bcaf1b3..4fe22d1 100644 >>> --- a/mk/rte.app.mk >>> +++ b/mk/rte.app.mk >>> @@ -186,6 +186,9 @@ ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) >>> # The static libraries do not know their dependencies. >>> # So linking with static library requires explicit dependencies. >>> _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrt >>> +ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES),yy) >>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lnuma >>> +endif >>> _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm >>> _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt >>> _LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lm >>> >> >> >> >> >>