From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] mbuf: optimize rte_mbuf_refcnt_update Date: Fri, 12 Jun 2015 16:10:48 +0200 Message-ID: <2144150.gTJNG4VPJx@xps13> References: <1433151145-8176-1-git-send-email-olivier.matz@6wind.com> <1433775442-31438-1-git-send-email-olivier.matz@6wind.com> <20150609125733.GA2140@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Olivier Matz Return-path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 054202E8A for ; Fri, 12 Jun 2015 16:11:46 +0200 (CEST) Received: by wibut5 with SMTP id ut5so20055974wib.1 for ; Fri, 12 Jun 2015 07:11:45 -0700 (PDT) In-Reply-To: <20150609125733.GA2140@bricha3-MOBL3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-06-09 13:57, Bruce Richardson: > On Mon, Jun 08, 2015 at 04:57:22PM +0200, Olivier Matz wrote: > > In __rte_pktmbuf_prefree_seg(), there was an optimization to avoid using > > a costly atomic operation when updating the mbuf reference counter if > > its value is 1. Indeed, it means that we are the only owner of the mbuf, > > and therefore nobody can change it at the same time. > > > > We can generalize this optimization directly in rte_mbuf_refcnt_update() > > so the other callers of this function, like rte_pktmbuf_attach(), can > > also take advantage of this optimization. > > > > Signed-off-by: Olivier Matz > > Acked-by: Bruce Richardson Applied, thanks