From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 925A937AA for ; Mon, 25 Jul 2016 00:57:41 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 24 Jul 2016 15:57:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,416,1464678000"; d="scan'208";a="739124507" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by FMSMGA003.fm.intel.com with ESMTP; 24 Jul 2016 15:57:39 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.51]) by IRSMSX102.ger.corp.intel.com ([169.254.2.123]) with mapi id 14.03.0248.002; Sun, 24 Jul 2016 23:57:38 +0100 From: "Ananyev, Konstantin" To: Jerin Jacob , "dev@dpdk.org" CC: "thomas.monjalon@6wind.com" Thread-Topic: [dpdk-dev] [PATCH] ring: fix sc dequeue performance issue Thread-Index: AQHR5c32zjkJBMhLaECHZMxjxtwg46AoMZbw Date: Sun, 24 Jul 2016 22:57:38 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B817D7@irsmsx105.ger.corp.intel.com> References: <1469380060-26696-1-git-send-email-jerin.jacob@caviumnetworks.com> In-Reply-To: <1469380060-26696-1-git-send-email-jerin.jacob@caviumnetworks.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ring: fix sc dequeue performance issue 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: Sun, 24 Jul 2016 22:57:42 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Sunday, July 24, 2016 6:08 PM > To: dev@dpdk.org > Cc: thomas.monjalon@6wind.com; Ananyev, Konstantin ; Jerin Jacob > > Subject: [dpdk-dev] [PATCH] ring: fix sc dequeue performance issue >=20 > Use of rte_smb_wmb() instead of rte_smb_rmb() in sc dequeue function crea= tes the additional overhead of waiting for all the STOREs to be > completed to local buffer from ring buffer memory. The sc dequeue functio= n demands only LOAD-STORE barrier where LOADs from ring > buffer memory needs to be completed before tail pointer update. Changing = to rte_smb_rmb() to enable the required LOAD-STORE barrier. >=20 > Fixes: ecc7d10e448e ("ring: guarantee dequeue ordering before tail update= ") >=20 > Signed-off-by: Jerin Jacob > --- > lib/librte_ring/rte_ring.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h inde= x f928324..0e22e69 100644 > --- a/lib/librte_ring/rte_ring.h > +++ b/lib/librte_ring/rte_ring.h > @@ -756,7 +756,7 @@ __rte_ring_sc_do_dequeue(struct rte_ring *r, void **o= bj_table, >=20 > /* copy in table */ > DEQUEUE_PTRS(); > - rte_smp_wmb(); > + rte_smp_rmb(); >=20 > __RING_STAT_ADD(r, deq_success, n); > r->cons.tail =3D cons_next; > -- Acked-by: Konstantin Ananyev > 2.5.5