From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=1HYrzALLDBESSvFs/9ey5PEqBrPgUqmPUL6wgcul35Y=; b=f3saGt8vA8BlvnvIJy4xpnG0wekEObh61CbfjW1rRjsRc/HA7J/lwrKbDILA3ADAZW jK7MC81NvG7hydTpf+0uOdvooZle09ZK3+kBLN5sNDbes7rjuhFbOz4wk1NXtEmy5Pvg reLkOjsEMZWLA3aT+RgqTozxOeqCryUyF1xgPlxJnC0C03coz/tM73eD4G4FrEAu6wBY J1MV7fzJNicZABJYrQQmgSwSiC/k8U1foA+gK9/2+mfKC12yLNFNM/863ruTo+cLYGUb erO9UeT+qf5R/gGdtsGan3B7D6uuTT3/v7YPVPkAdpVzt1aO2MDgiXhUn/gJvJzAtBs9 7fMA== X-Gm-Message-State: ALoCoQn9np0Ppa8oPPqfYJKdFrpfqonjlodIDlNHsQoMyiBFEmysON80840jSm7vNxuze7miEfS2 X-Received: by 10.194.47.196 with SMTP id f4mr26346220wjn.46.1434118305863; Fri, 12 Jun 2015 07:11:45 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id l6sm2938348wib.18.2015.06.12.07.11.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 07:11:44 -0700 (PDT) From: Thomas Monjalon To: Olivier Matz Date: Fri, 12 Jun 2015 16:10:48 +0200 Message-ID: <2144150.gTJNG4VPJx@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <20150609125733.GA2140@bricha3-MOBL3> 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-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] mbuf: optimize rte_mbuf_refcnt_update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 14:11:46 -0000 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