From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 7F8872BAE; Mon, 11 Dec 2017 11:28:35 +0100 (CET) Received: from lfbn-1-6068-189.w90-110.abo.wanadoo.fr ([90.110.3.189] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eOLQ9-000278-Et; Mon, 11 Dec 2017 11:34:51 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 11 Dec 2017 11:28:25 +0100 Date: Mon, 11 Dec 2017 11:28:25 +0100 From: Olivier MATZ To: dev@dpdk.org, hhaim@cisco.com, stable@dpdk.org Cc: matvejchikov@gmail.com, konstantin.ananyev@intel.com Message-ID: <20171211102824.fshpnmxuxun5pp54@platinum> References: <20171115091413.27119-1-hhaim@cisco.com> <20171208154651.16546-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171208154651.16546-1-olivier.matz@6wind.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 10:28:35 -0000 On Fri, Dec 08, 2017 at 04:46:51PM +0100, Olivier Matz wrote: > When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference > counter uses an atomic operation. This is not necessary and impacts > the performance (seen with TRex traffic generator). > > We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update() > because it would add an additional check. > > Solves this by introducing __rte_mbuf_refcnt_update(), which > updates the reference counter without doing anything else. > > Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool") > Suggested-by: Hanoch Haim > Signed-off-by: Olivier Matz Forgot to Cc stable@dpdk.org