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 0DB3FA0C5C; Wed, 8 Sep 2021 19:05:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6ED040E01; Wed, 8 Sep 2021 19:05:24 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id A4E074003E for ; Wed, 8 Sep 2021 18:51:41 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id c13-20020a17090a558d00b00198e6497a4fso1640285pji.4 for ; Wed, 08 Sep 2021 09:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9zlsjfAgzx50ZO2ypI5Hl32xDfJ3ym+R/A8HjIPfMHQ=; b=KS6FIY3cnq3n9UD/J9jpNpuoc8YIxJh4SNNajF/eoRKIktRmkfAFX+P8Iet9W1HYVt U/pjvMi/w80X7ROtz8Pm0ZSh2eQyZ/q79Dm7dFvt7BeazgBa45AsSXsgPAGJ+rP8d0PD 0qGUWsrKxqSnfQPULJi7PxPW2yFWP9t1GCQzIcLkIAVXITuzOdpRM4xVr8H3mzk+3QHj AbVzvkx0xt5HWrOmQXOotJUkJD4GwTh/aUaiwudsFS3UBG7rSZD7/3xPMGaKZTJ82wzw sasrsqIY6wLBaksMlYvZbbotvEC0btt0nFp70AC6ad0DSQHr3FB2XJa34o43XH1XSRCE OBKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9zlsjfAgzx50ZO2ypI5Hl32xDfJ3ym+R/A8HjIPfMHQ=; b=gknaYOz0tVPBVnJ+ea42Am7E5+mebJR985qYhw8VD1yJAE992IIBpOTy1L/x+3LYHG d/QX8aUYkcPI3l5MP6PEnRezb/DDrf9bRMk5QwSHmv889mI71+GJxH+TPKRBblIIfKwm fUNFEyQcYuy4eWevP6SxVCfJNcV7Qx0+ACjcpxi7zYv3TeXsUPkyr6P0twEMRsMRxT1x Y9B1GptS5/WQnxYzb8l5PgMAEXDdBrwqJKHj+Zw33CLpXvZ/bC1pMl14/vzs8owyrV4s Xni2Lt014Pas107w58iKtpGxkGp8Hz1EVLpJPUNT5Tli0zTamhOGQ4xfz7wCMC+AeVYm LW3A== X-Gm-Message-State: AOAM531wOWPl++/44wZMrVl3NErR4tzdTPpz/bsS3XwbQ2mPK8+KxmUF Z/wb0pyWnqQYrk4eAfKg1Gv7ahLLX6HlCQ== X-Google-Smtp-Source: ABdhPJwMTEHbFHf7zfx6DRGpgAhDKuTdaDj4YfCCK1N93+MyqxDBEu6sgUDFJ20uaCVMeRh8nSc8aw== X-Received: by 2002:a17:902:d895:b0:13a:2789:d5a with SMTP id b21-20020a170902d89500b0013a27890d5amr3819111plz.38.1631119900569; Wed, 08 Sep 2021 09:51:40 -0700 (PDT) Received: from localhost.localdomain (74.120.174.58.16clouds.com. [74.120.174.58]) by smtp.gmail.com with ESMTPSA id e16sm3013385pfl.58.2021.09.08.09.51.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 09:51:40 -0700 (PDT) From: Kefu Chai To: dev@dpdk.org Cc: Kefu Chai , Bruce Richardson Date: Thu, 9 Sep 2021 00:51:31 +0800 Message-Id: <20210908165131.133444-1-tchaikov@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210902151100.140330-1-tchaikov@gmail.com> References: <20210902151100.140330-1-tchaikov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 08 Sep 2021 19:05:24 +0200 Subject: [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" 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