From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-stable] [PATCH v4 4/4] ring: move the atomic load of head above the loop Date: Sat, 27 Oct 2018 16:21:15 +0200 Message-ID: <5753916.aeTW7YTmxD@xps> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit 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 To: Gavin Hu Return-path: In-Reply-To: <1537171879-64390-4-git-send-email-gavin.hu@arm.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.