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 DCF62A0548; Mon, 20 Sep 2021 09:51:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D11A40DF7; Mon, 20 Sep 2021 09:51:19 +0200 (CEST) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by mails.dpdk.org (Postfix) with ESMTP id 003CB40DF5 for ; Mon, 20 Sep 2021 09:51:17 +0200 (CEST) Received: by mail-qk1-f173.google.com with SMTP id ay33so39563631qkb.10 for ; Mon, 20 Sep 2021 00:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=APOrhwq/Uz0s8HCMOJqhDe83u1sheSR6KsK9SpEodZk=; b=HasWNJewPi6uBnqb/+RGK2n6ofJ+8q3OEqiugogr2HWXStThpPiDbTlvlbhLRGibHM oHAB6/H7erW6e7xfTLm2f4RorOTL5tWIBv9JoIhtg+JQJhEXCHZu3p6Kp7Lyc75kjzCq iETlvgzzzIC66zFT26iSj5o7jmHeAkWdh0oOB4CxB5ACr2i3UHWlnkB9YmBIrhCfOeQt dg77VH2IIQsQHD/8Xm5gj27L04WFpSfYWk5WFzQH6/EvRq6dcQP3pi40zRQB6lTBSjGZ LDRMZWFa8XRceJuOsGyUq7kiNvcbja4BojlU7S30G50nRMo0KjtBlNEjAZfqP4ZXShBB CVJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=APOrhwq/Uz0s8HCMOJqhDe83u1sheSR6KsK9SpEodZk=; b=SYqyyYrSpi9jpZoQ345h7ebO7IcZrN64rnKRsmu0mHQZMw0avQO2UdJE4OerAIu4Ja icyTjX1Y1+Ywhk307ga2KEAP4nr3sj8pHP0FAw5l1W3orJOpirveBcCfRDejnxwWn/hM yiL9ee4Jt15OzV0/awATZhUf3D2sUuoEF7noAMDv/4R/QSJruR7QXkU9HBgkBMp3mE5d ddYZOWi977n5INdwdoLO3+8SKowvkrJT3bUzeiTyicyvu4UTOLS7CsgrBfxUdmmDuQtA FAc9cMeC6CduX3kySd/nlX+dsxuyfOgngu6sUx8w5YuUfaidN2k9uVyPzxAqQ+jbSPD9 nvpg== X-Gm-Message-State: AOAM531jU6HEIY0K+rCm3w9RFsl9KJh9LBZ/cjoI60W1GvRNqxmvk6LP Rrwd6tMm3bqbaWzocJSm09FZeEXcU23ibwU4/DEH5/SzbMQ= X-Google-Smtp-Source: ABdhPJw9CbbAbjoR2MhMvxyAj2Mlz8S0YyAYAbamSECRTcliWIBU3/igN/OpZ1Qi9bYYCiUCTmZjiJMf8f6AcOq8Dn8= X-Received: by 2002:a25:1a07:: with SMTP id a7mr29300770yba.522.1632124277213; Mon, 20 Sep 2021 00:51:17 -0700 (PDT) MIME-Version: 1.0 References: <20210902151100.140330-1-tchaikov@gmail.com> <20210908165131.133444-1-tchaikov@gmail.com> In-Reply-To: <20210908165131.133444-1-tchaikov@gmail.com> From: kefu chai Date: Mon, 20 Sep 2021 15:51:06 +0800 Message-ID: To: dev@dpdk.org Cc: Bruce Richardson Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4] build: add meson options of max_memseg_lists and atomic_mbuf_ref_counts 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" hello Bruce, do you have any further concerns? is there anything i can do to move this forward? cheers, On Thu, Sep 9, 2021 at 12:51 AM Kefu Chai wrote: > > RTE_MAX_MEMSEG_LISTS = 128 is not enough for high-memory machines, in our > case, we need to increase it to 8192. so add an option so user can > override it. RTE_MBUF_REFCNT_ATOMIC = 0 is not necessary for applications > like Seastar, where it's safe to assume that the mbuf refcnt is only > updated by a single core only. > > --- > > v4: > > fix the coding style issue by reduce the line length to under 75. > this change should silence the warning like: > > WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) > #81: > RTE_MAX_MEMSEG_LISTS = 128 is not enough for high-memory machines, in our case, > > total: 0 errors, 1 warnings, 35 lines checked > > Signed-off-by: Kefu Chai > --- > config/meson.build | 5 ++++- > config/rte_config.h | 2 -- > meson_options.txt | 4 ++++ > 3 files changed, 8 insertions(+), 3 deletions(-) > > diff --git a/config/meson.build b/config/meson.build > index 3b5966ec2f..d95dccdbcc 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('atomic_mbuf_ref_counts') > + 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..6aeae211cd 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -38,6 +38,10 @@ 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('atomic_mbuf_ref_counts', type: 'boolean', value: true, description: > + 'atomically access the mbuf refcnt') > option('platform', type: 'string', value: 'native', description: > 'Platform to build, either "native", "generic" or a SoC. Please refer to the Linux build guide for more information.') > option('enable_trace_fp', type: 'boolean', value: false, description: > -- > 2.33.0 > -- Regards Kefu Chai