From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B3A38A0C4C; Thu, 2 Sep 2021 17:02:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81E734003E; Thu, 2 Sep 2021 17:02:35 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id C31594003C for ; Thu, 2 Sep 2021 17:02:33 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10094"; a="216004333" X-IronPort-AV: E=Sophos;i="5.85,262,1624345200"; d="scan'208";a="216004333" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2021 08:02:32 -0700 X-IronPort-AV: E=Sophos;i="5.85,262,1624345200"; d="scan'208";a="578221797" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.1.171]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 02 Sep 2021 08:02:31 -0700 Date: Thu, 2 Sep 2021 16:02:28 +0100 From: Bruce Richardson To: Kefu Chai Cc: dev@dpdk.org Message-ID: References: <20210902144805.105098-1-tchaikov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210902144805.105098-1-tchaikov@gmail.com> Subject: Re: [dpdk-dev] [PATCH] build: add meson option of "max_memseg_lists" and "mbuf_refcnt_atomic" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Sep 02, 2021 at 10:48:05PM +0800, Kefu Chai wrote: > RTE_MAX_MEMSEG_LISTS = 128 is not enough for some use cases, so add an > option so user can override it. How big a value do you need? Can you share anything about the use-case where you are hitting this limit? > RTE_MBUF_REFCNT_ATOMIC = 0 is enough for applications like Seastar, > where it's safe to assume that the mbuf refcnt is only updated by a single > core only. > > Signed-off-by: Kefu Chai > --- > config/meson.build | 5 ++++- > config/rte_config.h | 2 -- > meson_options.txt | 5 +++++ > 3 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/config/meson.build b/config/meson.build > index 3b5966ec2f..72dd461198 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -301,7 +301,10 @@ 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('mbuf_refcnt_atomic') > + dpdk_conf.set('RTE_MBUF_REFCNT_ATOMIC', true) > +endif > > compile_time_cpuflags = [] > subdir(arch_subdir) > diff --git a/config/rte_config.h b/config/rte_config.h > index 590903c07d..0a659f5e1a 100644 > --- a/config/rte_config.h > +++ b/config/rte_config.h > @@ -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 > @@ -50,7 +49,6 @@ > > /* mbuf defines */ > #define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc" > -#define RTE_MBUF_REFCNT_ATOMIC 1 > #define RTE_PKTMBUF_HEADROOM 128 > > /* ether defines */ > diff --git a/meson_options.txt b/meson_options.txt > index 0e92734c49..c0e8958797 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -38,6 +38,11 @@ option('max_lcores', type: 'integer', value: 128, description: > 'maximum number of cores/threads supported by EAL') > option('max_numa_nodes', type: 'integer', value: 32, description: > 'maximum number of NUMA nodes supported by EAL') > +option('max_memseg_lists', type: 'integer', value: 128, description: > + 'maximum number of dynamic arrays holding memsegs') > +option('mbuf_refcnt_atomic', type: 'boolean', value: true, description: > + 'atomically access the mbuf refcnt') > + No blank line after the option. I'd suggest renaming it to "atomic_mbuf_ref_counts" to make the entry name more readable - at the cost of it being longer, unfortunately. /Bruce