From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D5817DE6 for ; Tue, 9 Jun 2015 14:57:37 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 09 Jun 2015 05:57:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,581,1427785200"; d="scan'208";a="707899483" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.21]) by orsmga001.jf.intel.com with SMTP; 09 Jun 2015 05:57:34 -0700 Received: by (sSMTP sendmail emulation); Tue, 09 Jun 2015 13:57:34 +0025 Date: Tue, 9 Jun 2015 13:57:34 +0100 From: Bruce Richardson To: Olivier Matz Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433775442-31438-1-git-send-email-olivier.matz@6wind.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) 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: Tue, 09 Jun 2015 12:57:38 -0000 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