From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id F3F474C9C for ; Fri, 9 Nov 2018 12:43:02 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 15B7B80D; Fri, 9 Nov 2018 03:43:02 -0800 (PST) Received: from net-arm-c2400.shanghai.arm.com (net-arm-c2400.shanghai.arm.com [10.169.40.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 680573F718; Fri, 9 Nov 2018 03:43:00 -0800 (PST) From: Gavin Hu To: dev@dpdk.org Cc: thomas@monjalon.net, stephen@networkplumber.org, olivier.matz@6wind.com, chaozhu@linux.vnet.ibm.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, jerin.jacob@caviumnetworks.com, Honnappa.Nagarahalli@arm.com, gavin.hu@arm.com Date: Fri, 9 Nov 2018 19:42:45 +0800 Message-Id: <1541763767-7399-1-git-send-email-gavin.hu@arm.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH v1 0/2] ring C11 library fix and optimization 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: Fri, 09 Nov 2018 11:43:03 -0000 V1: Update the ring C11 library including the following changes: 1) On relaxed ordering platforms(like Arm64,PPPC), in ring C11 implementation, loading head and tail might be reodered, this makes CAS(compare and retry the flow if the head is outdated) not working as expected, the fix is to ensure the head is read before the tail, leaving no chances of the combination of outdated head and new tail. 2) With the above memory fence introduced, some loading can be relaxed. Gavin Hu (2): ring: keep the deterministic order allowing retry to work ring: relaxed ordering for load and store the head lib/librte_ring/rte_ring_c11_mem.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.7.4