DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds
@ 2020-07-02 10:57 Bruce Richardson
  2020-07-02 10:59 ` Bruce Richardson
  2020-07-02 11:19 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Bruce Richardson @ 2020-07-02 10:57 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, anatoly.burakov

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 <bruce.richardson@intel.com>
---
 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
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds
  2020-07-02 10:57 [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds Bruce Richardson
@ 2020-07-02 10:59 ` Bruce Richardson
  2020-07-02 11:19 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2020-07-02 10:59 UTC (permalink / raw)
  To: dev; +Cc: anatoly.burakov

On Thu, Jul 02, 2020 at 11:57:21AM +0100, Bruce Richardson wrote:
> 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.
> 
Oops, typo 2MB -> 2GB

> Bugzilla ID: 498
> Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
> Cc: anatoly.burakov@intel.com
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  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
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds
  2020-07-02 10:57 [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds Bruce Richardson
  2020-07-02 10:59 ` Bruce Richardson
@ 2020-07-02 11:19 ` Ferruh Yigit
  2020-07-05 14:41   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2020-07-02 11:19 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: anatoly.burakov

On 7/2/2020 11:57 AM, Bruce Richardson wrote:
> 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 <bruce.richardson@intel.com>

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds
  2020-07-02 11:19 ` Ferruh Yigit
@ 2020-07-05 14:41   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-07-05 14:41 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, anatoly.burakov, Ferruh Yigit

02/07/2020 13:19, Ferruh Yigit:
> On 7/2/2020 11:57 AM, Bruce Richardson wrote:
> > 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 <bruce.richardson@intel.com>
> 
> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied with typo fixed, thanks




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-05 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 10:57 [dpdk-dev] [PATCH] build: fix memory init failures with 32-bit builds Bruce Richardson
2020-07-02 10:59 ` Bruce Richardson
2020-07-02 11:19 ` Ferruh Yigit
2020-07-05 14:41   ` 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).