From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id E92754F9C; Sat, 27 Oct 2018 16:21:11 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 80F1721EF9; Sat, 27 Oct 2018 10:21:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 27 Oct 2018 10:21:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=TJ6gyRXSo/eCJbg54edef91lyZlMyG+NlcTesctp3Ow=; b=Ob22eOOVmU9P g30Ypi/q4hEN/ydMv1Qa/HNRhWDc5OWb/Fj3ZzKJUYj/qENns7pwISiaHMecrG9y MugN70sqy9N4NHTATh1/HsNFgNXgTS+Iu4U1JxM51bQjRh5Afc8TZabsjruawJLL Lz07evVQrK1flB+YsCttZhqi1ALVmWE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=TJ6gyRXSo/eCJbg54edef91lyZlMyG+NlcTesctp3 Ow=; b=SqTd8ydZaWsc7sbsvHVwxBc0mMlGthBZ1dj/44/+A2fKm3whPqTU+lRDM P1ED9itue7ZJ15CJAkmnMhWTzH+M2Xh3ce2eXhXV/cvmBh6Jitf6yA/c9SP5OWSl CgyqLDEtMYmlG1jEKoqd40JTFqh6J3pH0Oy/2kiZvfoBm4byFoRtSFHsAXjimhWh z/7I0jZ8puxOBU5dVzGDk/m35Dyw8ea/75EvSHHI/XVYWeHYFqMOZ9Eu8qSAt302 BBvh+9zHE4G6GnIl5/4PsiY5cVkEH1AX52vfKbDY1fJBbtC1MUxNChGYhOayF5Dt 4U8glsj8hCAQNB7cdlyPccZmXhIuQ== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2C748E427A; Sat, 27 Oct 2018 10:21:09 -0400 (EDT) From: Thomas Monjalon To: Gavin Hu Cc: stable@dpdk.org, dev@dpdk.org, Honnappa.Nagarahalli@arm.com, steve.capper@arm.com, Ola.Liljedahl@arm.com, jerin.jacob@caviumnetworks.com, nd@arm.com, justin.he@arm.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, olivier.matz@6wind.com Date: Sat, 27 Oct 2018 16:21:15 +0200 Message-ID: <5753916.aeTW7YTmxD@xps> In-Reply-To: <1537171879-64390-4-git-send-email-gavin.hu@arm.com> References: <20180917074735.28161-1-gavin.hu@arm.com> <1537171879-64390-1-git-send-email-gavin.hu@arm.com> <1537171879-64390-4-git-send-email-gavin.hu@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v4 4/4] ring: move the atomic load of head above the loop X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 14:21:12 -0000 17/09/2018 10:11, Gavin Hu: > In __rte_ring_move_prod_head, move the __atomic_load_n up and out of > the do {} while loop as upon failure the old_head will be updated, > another load is costly and not necessary. > > This helps a little on the latency,about 1~5%. > > Test result with the patch(two cores): > SP/SC bulk enq/dequeue (size: 8): 5.64 > MP/MC bulk enq/dequeue (size: 8): 9.58 > SP/SC bulk enq/dequeue (size: 32): 1.98 > MP/MC bulk enq/dequeue (size: 32): 2.30 > > Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option") > Cc: stable@dpdk.org > > Signed-off-by: Gavin Hu > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Steve Capper > Reviewed-by: Ola Liljedahl We are missing reviews and acknowledgements on this series.