patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'mem: warn user when running without NUMA support' has been queued to LTS release 18.11.2
Date: Thu, 25 Apr 2019 16:39:45 +0100	[thread overview]
Message-ID: <20190425154037.28778-10-ktraynor@redhat.com> (raw)
In-Reply-To: <20190425154037.28778-1-ktraynor@redhat.com>

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 <anatoly.burakov@intel.com>
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 <anatoly.burakov@intel.com>
---
 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)

  parent reply	other threads:[~2019-04-25 15:41 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 15:39 [dpdk-stable] patch 'drivers: fix SPDX license id consistency' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'malloc: fix IPC message initialization' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: fix secondary process setup' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/netvsc: fix VF support with secondary process' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: fix check for mmap failure' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: stop mapping if empty resource found' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: map ring in secondary process' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/fslmc: decrease log level for unsupported devices' " Kevin Traynor
2019-04-26  9:38   ` [dpdk-stable] [EXT] " Hemant Agrawal
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/dpaa: fix Rx discard register mask' " Kevin Traynor
2019-04-25 15:39 ` Kevin Traynor [this message]
2019-04-25 15:39 ` [dpdk-stable] patch 'eal/linux: remove thread ID from debug message' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/fslmc: remove unused include of error.h' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/fslmc: fix build with musl libc' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/nfp: " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/netvsc: fix include of fcntl.h' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/test: fix flags with meson' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/test: fix build with musl libc' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/vdev_netvsc: fix device cast' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/testpmd: add missing newline when showing statistics' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/testpmd: extend forwarding statistics to 64 bits' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/testpmd: remove useless casts on statistics' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'ethdev: fix a typo' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/i40e: log when provided RSS key is not valid' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/bnxt: fix Rx VLAN offload flags' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/fm10k: fix VLAN strip offload flag' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/virtio: fix duplicate naming of include guard' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/virtio-user: fix multi-process support' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'vhost/crypto: fix parens' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'raw/ifpga: modify log output' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/netvsc: remove useless condition' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/virtio: " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'power: fix governor storage to trim newlines' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'telemetry: fix mapping of statistics' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'app/test: fix sprintf with strlcat' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'maintainers: update for IBM POWER' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'eal: initialize alarms early' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'ring: fix an error message' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'mem: limit use of address hint' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'event/sw: fix enqueue checks in self-test' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'test/event: replace sprintf with snprintf' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'compress/isal: fix compression stream initialization' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix session clearing' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix offset calculation for GCM' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'drivers/qat: fix queue pair NUMA node' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'compress/isal: fix getting information about CPU' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'ring: fix namesize macro documentation block' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'eal: tighten permissions on shared memory files' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/bonding: fix buffer length when printing strings' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix to support multiprocess execution' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'power: remove unused variable' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'test/distributor: replace sprintf with strlcpy' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'test/hash: replace sprintf with snprintf' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'eal: fix typo in comment of vector function' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix links to doxygen and sphinx sites' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix two typos in contributing guide' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix ABI check script examples' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'cfgfile: replace strcat with strlcat' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/mlx5: fix errno typos in comments' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix typos in mlx5 guide' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix typos in testpmd user " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'app/testpmd: fix typo in comment' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'ethdev: fix typo in error messages' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190425154037.28778-10-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).