[v5,2/2] build: add meson options of max_memseg_lists
Checks
Commit Message
RTE_MAX_MEMSEG_LISTS = 128 is not enough for many-core machines, in our
case, we need to increase it to 8192. so add an option so user can
override it.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
config/meson.build | 1 +
config/rte_config.h | 1 -
meson_options.txt | 2 ++
3 files changed, 3 insertions(+), 1 deletion(-)
Comments
On Thu, Oct 14, 2021 at 04:54:19AM +0800, Kefu Chai wrote:
> RTE_MAX_MEMSEG_LISTS = 128 is not enough for many-core machines, in our
> case, we need to increase it to 8192. so add an option so user can
> override it.
>
> Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This seems a very low-level option to be exposing to the user. Some
thoughts/questions:
- can you give some more detail on why you need such a massive number, 64
times the default?
- what would be the impact of increasing the default to 8192? I assume this
is only used in a few places in EAL, so would the memory footprint
increase be large?
- rather than a single specified value, would an alternative be to make
this be a computed value at config time, scaled by number of lcores (or
number of numa nodes)?
Regards,
/Bruce
14/10/2021 10:25, Bruce Richardson:
> On Thu, Oct 14, 2021 at 04:54:19AM +0800, Kefu Chai wrote:
> > RTE_MAX_MEMSEG_LISTS = 128 is not enough for many-core machines, in our
> > case, we need to increase it to 8192. so add an option so user can
> > override it.
> >
> > Signed-off-by: Kefu Chai <tchaikov@gmail.com>
>
> This seems a very low-level option to be exposing to the user. Some
> thoughts/questions:
>
> - can you give some more detail on why you need such a massive number, 64
> times the default?
> - what would be the impact of increasing the default to 8192? I assume this
> is only used in a few places in EAL, so would the memory footprint
> increase be large?
> - rather than a single specified value, would an alternative be to make
> this be a computed value at config time, scaled by number of lcores (or
> number of numa nodes)?
+1 for these suggestions
@@ -299,6 +299,7 @@ if dpdk_conf.get('RTE_ARCH_64')
else # for 32-bit we need smaller reserved memory areas
dpdk_conf.set('RTE_MAX_MEM_MB', 2048)
endif
+dpdk_conf.set('RTE_MAX_MEMSEG_LISTS', get_option('max_memseg_lists'))
if get_option('atomic_mbuf_ref_counts')
dpdk_conf.set('RTE_MBUF_REFCNT_ATOMIC', true)
endif
@@ -29,7 +29,6 @@
/* EAL defines */
#define RTE_MAX_HEAPS 32
-#define RTE_MAX_MEMSEG_LISTS 128
#define RTE_MAX_MEMSEG_PER_LIST 8192
#define RTE_MAX_MEM_MB_PER_LIST 32768
#define RTE_MAX_MEMSEG_PER_TYPE 32768
@@ -38,6 +38,8 @@ option('max_lcores', type: 'string', value: 'default', description:
'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.')
option('max_numa_nodes', type: 'string', value: 'default', description:
'Set the highest NUMA node supported by EAL; "default" is different per-arch, "detect" detects the highest NUMA node on the build machine.')
+option('max_memseg_lists', type: 'integer', value: 128, description:
+ 'maximum number of dynamic arrays holding memsegs')
option('atomic_mbuf_ref_counts', type: 'boolean', value: true, description:
'atomically access the mbuf refcnt')
option('platform', type: 'string', value: 'native', description: