From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt Date: Mon, 11 Dec 2017 11:28:25 +0100 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 Cc: matvejchikov@gmail.com, konstantin.ananyev@intel.com To: dev@dpdk.org, hhaim@cisco.com, stable@dpdk.org Return-path: Content-Disposition: inline In-Reply-To: <20171208154651.16546-1-olivier.matz@6wind.com> 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 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