From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jia He Subject: [PATCH v8 0/3] support c11 memory model barrier in librte_ring Date: Tue, 16 Jan 2018 20:03:48 -0800 Message-ID: <1516161831-28719-1-git-send-email-hejianet@gmail.com> Cc: Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , konstantin.ananyev@intel.com, hemant.agrawal@nxp.com, Jia He To: dev@dpdk.org, Thomas Monjalon Return-path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id DFFD3A490 for ; Wed, 17 Jan 2018 05:04:10 +0100 (CET) Received: by mail-pl0-f68.google.com with SMTP id 66so7820566plc.13 for ; Tue, 16 Jan 2018 20:04:10 -0800 (PST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" To support C11 memory model barrier, 2 options are suggested by Jerin: 1. use rte_smp_rmb 2. use load_acquire/store_release CONFIG_RTE_RING_USE_C11_MEM_MODEL is provided, and by default it is "n" on any architectures so far. The reason why providing 2 options is due to the performance benchmark difference in different arm machines. Already fuctionally tested on the machines as follows: - on X86 - on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=y - on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=n --- Changelog: V8: Change the lincense to SPDX tag. Change USE_C11_MEM_MODEL to "n" on any architectures by default V7: fix check-git-log warnings which is suggested by Jerin V6: minor change in subject and log V5: split it into 2 patchset due to the milestone concerns, this is the 2st one. Also fix checkpatch.pl warnings V4: split into small patches V3: arch specific implementation for enqueue/dequeue barrier V2: let users choose whether using load_acquire/store_release V1: rte_smp_rmb() between 2 loads Jia He (3): eal/arm64: remove the braces {} for dmb() and dsb() ring: introduce new header file to include common functions ring: introduce new header file to support C11 memory model config/common_linuxapp | 2 + .../common/include/arch/arm/rte_atomic_64.h | 4 +- lib/librte_eventdev/rte_event_ring.h | 6 +- lib/librte_ring/Makefile | 4 +- lib/librte_ring/rte_ring.h | 173 ++---------------- lib/librte_ring/rte_ring_c11_mem.h | 193 ++++++++++++++++++++ lib/librte_ring/rte_ring_generic.h | 202 +++++++++++++++++++++ 7 files changed, 420 insertions(+), 164 deletions(-) create mode 100644 lib/librte_ring/rte_ring_c11_mem.h create mode 100644 lib/librte_ring/rte_ring_generic.h -- 2.7.4