From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 5C8BAA05D3 for ; Thu, 25 Apr 2019 17:41:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F2651B5C4; Thu, 25 Apr 2019 17:41:02 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id C53281B5D8 for ; Thu, 25 Apr 2019 17:40:58 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32719305C399; Thu, 25 Apr 2019 15:40:58 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.116.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71BB75D9CC; Thu, 25 Apr 2019 15:40:56 +0000 (UTC) From: Kevin Traynor To: Anatoly Burakov Cc: dpdk stable Date: Thu, 25 Apr 2019 16:39:45 +0100 Message-Id: <20190425154037.28778-10-ktraynor@redhat.com> In-Reply-To: <20190425154037.28778-1-ktraynor@redhat.com> References: <20190425154037.28778-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 25 Apr 2019 15:40:58 +0000 (UTC) Subject: [dpdk-stable] patch 'mem: warn user when running without NUMA support' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/01/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches can be viewed on the 18.11 branch at: https://github.com/kevintraynor/dpdk-stable-queue.git Thanks. Kevin Traynor --- >From e669bac4b0e5a411471d28b4ed10ad6cc50acdfc Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Fri, 29 Mar 2019 14:01:29 +0000 Subject: [PATCH] mem: warn user when running without NUMA support [ upstream commit 23d5455517568966ca8cac216941128ed3d3a455 ] Running in non-legacy mode on a NUMA-enabled system without libnuma is unsupported, so explicitly print out a warning when trying to do so. Running in legacy mode without libnuma is still supported whether or not we are running with libnuma support enabled, so also fix init to allow that scenario. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/eal_options.h | 2 ++ lib/librte_eal/linuxapp/eal/eal_memalloc.c | 4 ++++ lib/librte_eal/linuxapp/eal/eal_memory.c | 14 ++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h index 327c95e96..1623ae8cf 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -6,4 +6,6 @@ #define EAL_OPTIONS_H +#include "getopt.h" + enum { /* long options mapped to a short option */ diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c index f63d9ca66..81b441a96 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c @@ -741,4 +741,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id, goto mapped; } +#else + if (rte_socket_count() > 1) + RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n", + __func__); #endif diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 7a4a9ed3c..788aed25d 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -47,4 +47,5 @@ #include "eal_filesystem.h" #include "eal_hugepages.h" +#include "eal_options.h" #define PFN_MASK_SIZE 8 @@ -2039,5 +2040,6 @@ memseg_primary_init_32(void) #ifndef RTE_EAL_NUMA_AWARE_HUGEPAGES - if (socket_id > 0) + /* we can still sort pages by socket in legacy mode */ + if (!internal_config.legacy_mem && socket_id > 0) break; #endif @@ -2220,5 +2222,6 @@ memseg_primary_init(void) #ifndef RTE_EAL_NUMA_AWARE_HUGEPAGES - if (socket_id > 0) + /* we can still sort pages by socket in legacy mode */ + if (!internal_config.legacy_mem && socket_id > 0) break; #endif @@ -2379,4 +2382,11 @@ rte_eal_memseg_init(void) RTE_LOG(ERR, EAL, "Cannot get current resource limits\n"); } +#ifndef RTE_EAL_NUMA_AWARE_HUGEPAGES + if (!internal_config.legacy_mem && rte_socket_count() > 1) { + RTE_LOG(WARNING, EAL, "DPDK is running on a NUMA system, but is compiled without NUMA support.\n"); + RTE_LOG(WARNING, EAL, "This will have adverse consequences for performance and usability.\n"); + RTE_LOG(WARNING, EAL, "Please use --"OPT_LEGACY_MEM" option, or recompile with NUMA support.\n"); + } +#endif return rte_eal_process_type() == RTE_PROC_PRIMARY ? -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-25 16:37:47.206874908 +0100 +++ 0010-mem-warn-user-when-running-without-NUMA-support.patch 2019-04-25 16:37:46.694296116 +0100 @@ -1 +1 @@ -From 23d5455517568966ca8cac216941128ed3d3a455 Mon Sep 17 00:00:00 2001 +From e669bac4b0e5a411471d28b4ed10ad6cc50acdfc Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 23d5455517568966ca8cac216941128ed3d3a455 ] + @@ -14,2 +15,0 @@ -Cc: stable@dpdk.org - @@ -18,3 +18,3 @@ - lib/librte_eal/common/eal_options.h | 2 ++ - lib/librte_eal/linux/eal/eal_memalloc.c | 4 ++++ - lib/librte_eal/linux/eal/eal_memory.c | 14 ++++++++++++-- + lib/librte_eal/common/eal_options.h | 2 ++ + lib/librte_eal/linuxapp/eal/eal_memalloc.c | 4 ++++ + lib/librte_eal/linuxapp/eal/eal_memory.c | 14 ++++++++++++-- @@ -24 +24 @@ -index 58ee9ae33..9855429e5 100644 +index 327c95e96..1623ae8cf 100644 @@ -34,5 +34,5 @@ -diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c -index 14c3ea838..a965a9b65 100644 ---- a/lib/librte_eal/linux/eal/eal_memalloc.c -+++ b/lib/librte_eal/linux/eal/eal_memalloc.c -@@ -726,4 +726,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id, +diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c +index f63d9ca66..81b441a96 100644 +--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c ++++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c +@@ -741,4 +741,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id, @@ -47,5 +47,5 @@ -diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c -index 23fe44127..39cd359a0 100644 ---- a/lib/librte_eal/linux/eal/eal_memory.c -+++ b/lib/librte_eal/linux/eal/eal_memory.c -@@ -51,4 +51,5 @@ +diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c +index 7a4a9ed3c..788aed25d 100644 +--- a/lib/librte_eal/linuxapp/eal/eal_memory.c ++++ b/lib/librte_eal/linuxapp/eal/eal_memory.c +@@ -47,4 +47,5 @@ @@ -57 +57 @@ -@@ -2106,5 +2107,6 @@ memseg_primary_init_32(void) +@@ -2039,5 +2040,6 @@ memseg_primary_init_32(void) @@ -65 +65 @@ -@@ -2287,5 +2289,6 @@ memseg_primary_init(void) +@@ -2220,5 +2222,6 @@ memseg_primary_init(void) @@ -73 +73 @@ -@@ -2446,4 +2449,11 @@ rte_eal_memseg_init(void) +@@ -2379,4 +2382,11 @@ rte_eal_memseg_init(void)