From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt Date: Fri, 19 Jan 2018 00:23:40 +0100 Message-ID: <2358946.9nMsedO5u3@xps> 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-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, hhaim@cisco.com, matvejchikov@gmail.com, konstantin.ananyev@intel.com, stable@dpdk.org To: Olivier Matz Return-path: 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" 08/12/2017 16:46, Olivier Matz: > 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 Applied, thanks