* [dpdk-dev] [PATCH] mem: warn user when running without NUMA support
@ 2019-02-22 15:59 Anatoly Burakov
2019-03-27 10:31 ` Thomas Monjalon
2019-03-27 13:35 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
0 siblings, 2 replies; 17+ messages in thread
From: Anatoly Burakov @ 2019-02-22 15:59 UTC (permalink / raw)
To: dev; +Cc: stable
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.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_memalloc.c | 3 +++
lib/librte_eal/linuxapp/eal/eal_memory.c | 14 ++++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index b6fb183db..4e83a1a19 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
@@ -725,6 +725,9 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
__func__, socket_id, cur_socket_id);
goto mapped;
}
+#else
+ if (rte_socket_count() > 1)
+ RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n");
#endif
ms->addr = addr;
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 1b96b576e..e5a0e57ff 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -50,6 +50,7 @@
#include "eal_internal_cfg.h"
#include "eal_filesystem.h"
#include "eal_hugepages.h"
+#include "eal_options.h"
#define PFN_MASK_SIZE 8
@@ -2088,7 +2089,8 @@ memseg_primary_init_32(void)
socket_id = rte_socket_id_by_idx(i);
#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
@@ -2269,7 +2271,8 @@ memseg_primary_init(void)
int socket_id = rte_socket_id_by_idx(i);
#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
memtypes[cur_type].page_sz = hugepage_sz;
@@ -2428,6 +2431,13 @@ rte_eal_memseg_init(void)
} else {
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 ?
#ifndef RTE_ARCH_64
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: warn user when running without NUMA support
2019-02-22 15:59 [dpdk-dev] [PATCH] mem: warn user when running without NUMA support Anatoly Burakov
@ 2019-03-27 10:31 ` Thomas Monjalon
2019-03-27 10:31 ` Thomas Monjalon
2019-03-27 11:52 ` Burakov, Anatoly
2019-03-27 13:35 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
1 sibling, 2 replies; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-27 10:31 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dev, stable
22/02/2019 16:59, Anatoly Burakov:
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> --- a/lib/librte_eal/linuxapp/eal/eal_memory.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
> @@ -50,6 +50,7 @@
> #include "eal_internal_cfg.h"
> #include "eal_filesystem.h"
> #include "eal_hugepages.h"
> +#include "eal_options.h"
I'm seeing this error:
lib/librte_eal/common/eal_options.h:74:28: error:
array type has incomplete element type ‘struct option’
extern const struct option eal_long_options[];
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: warn user when running without NUMA support
2019-03-27 10:31 ` Thomas Monjalon
@ 2019-03-27 10:31 ` Thomas Monjalon
2019-03-27 11:52 ` Burakov, Anatoly
1 sibling, 0 replies; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-27 10:31 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dev, stable
22/02/2019 16:59, Anatoly Burakov:
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> --- a/lib/librte_eal/linuxapp/eal/eal_memory.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
> @@ -50,6 +50,7 @@
> #include "eal_internal_cfg.h"
> #include "eal_filesystem.h"
> #include "eal_hugepages.h"
> +#include "eal_options.h"
I'm seeing this error:
lib/librte_eal/common/eal_options.h:74:28: error:
array type has incomplete element type ‘struct option’
extern const struct option eal_long_options[];
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: warn user when running without NUMA support
2019-03-27 10:31 ` Thomas Monjalon
2019-03-27 10:31 ` Thomas Monjalon
@ 2019-03-27 11:52 ` Burakov, Anatoly
2019-03-27 11:52 ` Burakov, Anatoly
1 sibling, 1 reply; 17+ messages in thread
From: Burakov, Anatoly @ 2019-03-27 11:52 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, stable
On 27-Mar-19 10:31 AM, Thomas Monjalon wrote:
> 22/02/2019 16:59, Anatoly Burakov:
>> 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.
>>
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>> --- a/lib/librte_eal/linuxapp/eal/eal_memory.c
>> +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
>> @@ -50,6 +50,7 @@
>> #include "eal_internal_cfg.h"
>> #include "eal_filesystem.h"
>> #include "eal_hugepages.h"
>> +#include "eal_options.h"
>
> I'm seeing this error:
>
> lib/librte_eal/common/eal_options.h:74:28: error:
> array type has incomplete element type ‘struct option’
> extern const struct option eal_long_options[];
>
Yes, i've been meaning to resubmit but it fell through the cracks. I'll
do a v2 ASAP.
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: warn user when running without NUMA support
2019-03-27 11:52 ` Burakov, Anatoly
@ 2019-03-27 11:52 ` Burakov, Anatoly
0 siblings, 0 replies; 17+ messages in thread
From: Burakov, Anatoly @ 2019-03-27 11:52 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, stable
On 27-Mar-19 10:31 AM, Thomas Monjalon wrote:
> 22/02/2019 16:59, Anatoly Burakov:
>> 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.
>>
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>> --- a/lib/librte_eal/linuxapp/eal/eal_memory.c
>> +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
>> @@ -50,6 +50,7 @@
>> #include "eal_internal_cfg.h"
>> #include "eal_filesystem.h"
>> #include "eal_hugepages.h"
>> +#include "eal_options.h"
>
> I'm seeing this error:
>
> lib/librte_eal/common/eal_options.h:74:28: error:
> array type has incomplete element type ‘struct option’
> extern const struct option eal_long_options[];
>
Yes, i've been meaning to resubmit but it fell through the cracks. I'll
do a v2 ASAP.
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] mem: warn user when running without NUMA support
2019-02-22 15:59 [dpdk-dev] [PATCH] mem: warn user when running without NUMA support Anatoly Burakov
2019-03-27 10:31 ` Thomas Monjalon
@ 2019-03-27 13:35 ` Anatoly Burakov
2019-03-27 13:35 ` Anatoly Burakov
` (2 more replies)
1 sibling, 3 replies; 17+ messages in thread
From: Anatoly Burakov @ 2019-03-27 13:35 UTC (permalink / raw)
To: dev; +Cc: stable
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.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v2:
- Removed unneeded eal_options include that broke the compile
lib/librte_eal/linux/eal/eal_memalloc.c | 3 +++
lib/librte_eal/linux/eal/eal_memory.c | 13 +++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index b6fb183db..4e83a1a19 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -725,6 +725,9 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
__func__, socket_id, cur_socket_id);
goto mapped;
}
+#else
+ if (rte_socket_count() > 1)
+ RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n");
#endif
ms->addr = addr;
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 1b96b576e..09758e947 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -2088,7 +2088,8 @@ memseg_primary_init_32(void)
socket_id = rte_socket_id_by_idx(i);
#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
@@ -2269,7 +2270,8 @@ memseg_primary_init(void)
int socket_id = rte_socket_id_by_idx(i);
#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
memtypes[cur_type].page_sz = hugepage_sz;
@@ -2428,6 +2430,13 @@ rte_eal_memseg_init(void)
} else {
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 ?
#ifndef RTE_ARCH_64
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] mem: warn user when running without NUMA support
2019-03-27 13:35 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
@ 2019-03-27 13:35 ` Anatoly Burakov
2019-03-28 20:29 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-03-29 12:30 ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
2 siblings, 0 replies; 17+ messages in thread
From: Anatoly Burakov @ 2019-03-27 13:35 UTC (permalink / raw)
To: dev; +Cc: stable
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.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v2:
- Removed unneeded eal_options include that broke the compile
lib/librte_eal/linux/eal/eal_memalloc.c | 3 +++
lib/librte_eal/linux/eal/eal_memory.c | 13 +++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index b6fb183db..4e83a1a19 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -725,6 +725,9 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
__func__, socket_id, cur_socket_id);
goto mapped;
}
+#else
+ if (rte_socket_count() > 1)
+ RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n");
#endif
ms->addr = addr;
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 1b96b576e..09758e947 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -2088,7 +2088,8 @@ memseg_primary_init_32(void)
socket_id = rte_socket_id_by_idx(i);
#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
@@ -2269,7 +2270,8 @@ memseg_primary_init(void)
int socket_id = rte_socket_id_by_idx(i);
#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
memtypes[cur_type].page_sz = hugepage_sz;
@@ -2428,6 +2430,13 @@ rte_eal_memseg_init(void)
} else {
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 ?
#ifndef RTE_ARCH_64
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] mem: warn user when running without NUMA support
2019-03-27 13:35 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2019-03-27 13:35 ` Anatoly Burakov
@ 2019-03-28 20:29 ` Thomas Monjalon
2019-03-28 20:29 ` Thomas Monjalon
2019-03-29 12:30 ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
2 siblings, 1 reply; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-28 20:29 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: stable, dev
27/03/2019 14:35, Anatoly Burakov:
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>
> Notes:
> v2:
> - Removed unneeded eal_options include that broke the compile
There is another error when building build-arm64-host-clang:
../lib/librte_eal/linux/eal/eal_memory.c: In function 'rte_eal_memseg_init':
../lib/librte_eal/linux/eal/eal_memory.c:2437:40: error: expected ')' before 'OPT_LEGACY_MEM'
RTE_LOG(WARNING, EAL, "Please use --"OPT_LEGACY_MEM" option, or recompile with NUMA support.\n");
^~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] mem: warn user when running without NUMA support
2019-03-28 20:29 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2019-03-28 20:29 ` Thomas Monjalon
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-28 20:29 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: stable, dev
27/03/2019 14:35, Anatoly Burakov:
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>
> Notes:
> v2:
> - Removed unneeded eal_options include that broke the compile
There is another error when building build-arm64-host-clang:
../lib/librte_eal/linux/eal/eal_memory.c: In function 'rte_eal_memseg_init':
../lib/librte_eal/linux/eal/eal_memory.c:2437:40: error: expected ')' before 'OPT_LEGACY_MEM'
RTE_LOG(WARNING, EAL, "Please use --"OPT_LEGACY_MEM" option, or recompile with NUMA support.\n");
^~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v3] mem: warn user when running without NUMA support
2019-03-27 13:35 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2019-03-27 13:35 ` Anatoly Burakov
2019-03-28 20:29 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2019-03-29 12:30 ` Anatoly Burakov
2019-03-29 12:30 ` Anatoly Burakov
` (2 more replies)
2 siblings, 3 replies; 17+ messages in thread
From: Anatoly Burakov @ 2019-03-29 12:30 UTC (permalink / raw)
To: dev; +Cc: thomas, stable
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.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v3:
- Fix ill-conceived v2 "fix" by adding getopt header
to eal_options.h instead of removing the include
lib/librte_eal/common/eal_options.h | 2 ++
lib/librte_eal/linux/eal/eal_memalloc.c | 3 +++
lib/librte_eal/linux/eal/eal_memory.c | 14 ++++++++++++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h
index 58ee9ae33..9855429e5 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -5,6 +5,8 @@
#ifndef EAL_OPTIONS_H
#define EAL_OPTIONS_H
+#include "getopt.h"
+
enum {
/* long options mapped to a short option */
#define OPT_HELP "help"
diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index b6fb183db..4e83a1a19 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -725,6 +725,9 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
__func__, socket_id, cur_socket_id);
goto mapped;
}
+#else
+ if (rte_socket_count() > 1)
+ RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n");
#endif
ms->addr = addr;
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 1b96b576e..e5a0e57ff 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -50,6 +50,7 @@
#include "eal_internal_cfg.h"
#include "eal_filesystem.h"
#include "eal_hugepages.h"
+#include "eal_options.h"
#define PFN_MASK_SIZE 8
@@ -2088,7 +2089,8 @@ memseg_primary_init_32(void)
socket_id = rte_socket_id_by_idx(i);
#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
@@ -2269,7 +2271,8 @@ memseg_primary_init(void)
int socket_id = rte_socket_id_by_idx(i);
#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
memtypes[cur_type].page_sz = hugepage_sz;
@@ -2428,6 +2431,13 @@ rte_eal_memseg_init(void)
} else {
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 ?
#ifndef RTE_ARCH_64
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v3] mem: warn user when running without NUMA support
2019-03-29 12:30 ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
@ 2019-03-29 12:30 ` Anatoly Burakov
2019-03-29 12:43 ` Thomas Monjalon
2019-03-29 14:01 ` [dpdk-dev] [PATCH v4] " Anatoly Burakov
2 siblings, 0 replies; 17+ messages in thread
From: Anatoly Burakov @ 2019-03-29 12:30 UTC (permalink / raw)
To: dev; +Cc: thomas, stable
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.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v3:
- Fix ill-conceived v2 "fix" by adding getopt header
to eal_options.h instead of removing the include
lib/librte_eal/common/eal_options.h | 2 ++
lib/librte_eal/linux/eal/eal_memalloc.c | 3 +++
lib/librte_eal/linux/eal/eal_memory.c | 14 ++++++++++++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h
index 58ee9ae33..9855429e5 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -5,6 +5,8 @@
#ifndef EAL_OPTIONS_H
#define EAL_OPTIONS_H
+#include "getopt.h"
+
enum {
/* long options mapped to a short option */
#define OPT_HELP "help"
diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index b6fb183db..4e83a1a19 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -725,6 +725,9 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
__func__, socket_id, cur_socket_id);
goto mapped;
}
+#else
+ if (rte_socket_count() > 1)
+ RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n");
#endif
ms->addr = addr;
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 1b96b576e..e5a0e57ff 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -50,6 +50,7 @@
#include "eal_internal_cfg.h"
#include "eal_filesystem.h"
#include "eal_hugepages.h"
+#include "eal_options.h"
#define PFN_MASK_SIZE 8
@@ -2088,7 +2089,8 @@ memseg_primary_init_32(void)
socket_id = rte_socket_id_by_idx(i);
#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
@@ -2269,7 +2271,8 @@ memseg_primary_init(void)
int socket_id = rte_socket_id_by_idx(i);
#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
memtypes[cur_type].page_sz = hugepage_sz;
@@ -2428,6 +2431,13 @@ rte_eal_memseg_init(void)
} else {
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 ?
#ifndef RTE_ARCH_64
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH v3] mem: warn user when running without NUMA support
2019-03-29 12:30 ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
2019-03-29 12:30 ` Anatoly Burakov
@ 2019-03-29 12:43 ` Thomas Monjalon
2019-03-29 12:43 ` Thomas Monjalon
2019-03-29 14:01 ` [dpdk-dev] [PATCH v4] " Anatoly Burakov
2 siblings, 1 reply; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-29 12:43 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dev, stable
29/03/2019 13:30, Anatoly Burakov:
> + if (rte_socket_count() > 1)
> + RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n");
You missed something here. __func__?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH v3] mem: warn user when running without NUMA support
2019-03-29 12:43 ` Thomas Monjalon
@ 2019-03-29 12:43 ` Thomas Monjalon
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-29 12:43 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dev, stable
29/03/2019 13:30, Anatoly Burakov:
> + if (rte_socket_count() > 1)
> + RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n");
You missed something here. __func__?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v4] mem: warn user when running without NUMA support
2019-03-29 12:30 ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
2019-03-29 12:30 ` Anatoly Burakov
2019-03-29 12:43 ` Thomas Monjalon
@ 2019-03-29 14:01 ` Anatoly Burakov
2019-03-29 14:01 ` Anatoly Burakov
2019-03-29 23:27 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2 siblings, 2 replies; 17+ messages in thread
From: Anatoly Burakov @ 2019-03-29 14:01 UTC (permalink / raw)
To: dev; +Cc: thomas, stable
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.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v4:
- Fix missing __func__ in the print
v3:
- Fix compile issues
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 ++++++++++++--
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 58ee9ae33..9855429e5 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -5,6 +5,8 @@
#ifndef EAL_OPTIONS_H
#define EAL_OPTIONS_H
+#include "getopt.h"
+
enum {
/* long options mapped to a short option */
#define OPT_HELP "help"
diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index b6fb183db..36962d0b6 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -725,6 +725,10 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
__func__, socket_id, cur_socket_id);
goto mapped;
}
+#else
+ if (rte_socket_count() > 1)
+ RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n",
+ __func__);
#endif
ms->addr = addr;
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 1b96b576e..e5a0e57ff 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -50,6 +50,7 @@
#include "eal_internal_cfg.h"
#include "eal_filesystem.h"
#include "eal_hugepages.h"
+#include "eal_options.h"
#define PFN_MASK_SIZE 8
@@ -2088,7 +2089,8 @@ memseg_primary_init_32(void)
socket_id = rte_socket_id_by_idx(i);
#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
@@ -2269,7 +2271,8 @@ memseg_primary_init(void)
int socket_id = rte_socket_id_by_idx(i);
#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
memtypes[cur_type].page_sz = hugepage_sz;
@@ -2428,6 +2431,13 @@ rte_eal_memseg_init(void)
} else {
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 ?
#ifndef RTE_ARCH_64
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v4] mem: warn user when running without NUMA support
2019-03-29 14:01 ` [dpdk-dev] [PATCH v4] " Anatoly Burakov
@ 2019-03-29 14:01 ` Anatoly Burakov
2019-03-29 23:27 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
1 sibling, 0 replies; 17+ messages in thread
From: Anatoly Burakov @ 2019-03-29 14:01 UTC (permalink / raw)
To: dev; +Cc: thomas, stable
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.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v4:
- Fix missing __func__ in the print
v3:
- Fix compile issues
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 ++++++++++++--
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 58ee9ae33..9855429e5 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -5,6 +5,8 @@
#ifndef EAL_OPTIONS_H
#define EAL_OPTIONS_H
+#include "getopt.h"
+
enum {
/* long options mapped to a short option */
#define OPT_HELP "help"
diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index b6fb183db..36962d0b6 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -725,6 +725,10 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
__func__, socket_id, cur_socket_id);
goto mapped;
}
+#else
+ if (rte_socket_count() > 1)
+ RTE_LOG(DEBUG, EAL, "%s(): not checking hugepage NUMA node.\n",
+ __func__);
#endif
ms->addr = addr;
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 1b96b576e..e5a0e57ff 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -50,6 +50,7 @@
#include "eal_internal_cfg.h"
#include "eal_filesystem.h"
#include "eal_hugepages.h"
+#include "eal_options.h"
#define PFN_MASK_SIZE 8
@@ -2088,7 +2089,8 @@ memseg_primary_init_32(void)
socket_id = rte_socket_id_by_idx(i);
#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
@@ -2269,7 +2271,8 @@ memseg_primary_init(void)
int socket_id = rte_socket_id_by_idx(i);
#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
memtypes[cur_type].page_sz = hugepage_sz;
@@ -2428,6 +2431,13 @@ rte_eal_memseg_init(void)
} else {
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 ?
#ifndef RTE_ARCH_64
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v4] mem: warn user when running without NUMA support
2019-03-29 14:01 ` [dpdk-dev] [PATCH v4] " Anatoly Burakov
2019-03-29 14:01 ` Anatoly Burakov
@ 2019-03-29 23:27 ` Thomas Monjalon
2019-03-29 23:27 ` Thomas Monjalon
1 sibling, 1 reply; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-29 23:27 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: stable, dev
29/03/2019 15:01, Anatoly Burakov:
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v4] mem: warn user when running without NUMA support
2019-03-29 23:27 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2019-03-29 23:27 ` Thomas Monjalon
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Monjalon @ 2019-03-29 23:27 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: stable, dev
29/03/2019 15:01, Anatoly Burakov:
> 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.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2019-03-29 23:27 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22 15:59 [dpdk-dev] [PATCH] mem: warn user when running without NUMA support Anatoly Burakov
2019-03-27 10:31 ` Thomas Monjalon
2019-03-27 10:31 ` Thomas Monjalon
2019-03-27 11:52 ` Burakov, Anatoly
2019-03-27 11:52 ` Burakov, Anatoly
2019-03-27 13:35 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2019-03-27 13:35 ` Anatoly Burakov
2019-03-28 20:29 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-03-28 20:29 ` Thomas Monjalon
2019-03-29 12:30 ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
2019-03-29 12:30 ` Anatoly Burakov
2019-03-29 12:43 ` Thomas Monjalon
2019-03-29 12:43 ` Thomas Monjalon
2019-03-29 14:01 ` [dpdk-dev] [PATCH v4] " Anatoly Burakov
2019-03-29 14:01 ` Anatoly Burakov
2019-03-29 23:27 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-03-29 23:27 ` Thomas Monjalon
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).