From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 467F8237 for ; Mon, 4 Dec 2017 02:50:39 +0100 (CET) Received: by mail-pg0-f67.google.com with SMTP id y6so7111199pgp.4 for ; Sun, 03 Dec 2017 17:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0/OyU2yAe/9L8zXiOMIlUXsg29u9xdle/iXnLF/wYWU=; b=frTSjV+4lJE0fn/k9CB1Pe7NC55qrdw/gcMdIjuPDe9KN+TCLOJPb+b8FRvxjhmeit k6rYM+jDJe4Kx5NdQ/DlVNXDYg6vEqaNClVB69OAf3SeaKJ62XKhl1frJ07ZFMai1mEE ggtqZCZCsXaXcSQXU3JTrO5VUEu2MjgtSypfGIMHYSukya0RQ4tI4XVTD9+3CP5C6aeE XetK42TlBT35MllaLX4qbB4tpl4BVkwXhjhNeVTEQynnuOFqn734k652Q6r9bhcnBZ42 nANJF5uusQjGOSJrE2S9DcA/ssl50S+2dniWMSQYcP9Mq3j9gb6vsjWcXcDuUtiwowOX gkUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0/OyU2yAe/9L8zXiOMIlUXsg29u9xdle/iXnLF/wYWU=; b=NiB/lY76k8nusDl33IfhX70rcW3yetVYr7fLs4yPUTR+71vGs6bWh5JAM0Kw1TxEny b51+GRGVDOeeFOwQpHBHMljHVZ2Ccn7kI7sUieQonGQ6cvi8JpBk50YfuK3rqPwgy0gC AGwpyYhDpQg3SqAC+8q7u/kh6uG75ycO6FABIyhqEdlvvyuggUyvncEyjhhM7J6LRLJW hyXhtttHDwLdP9Em4rAOL0c4luQzslLB20upzHgTaAo4mMXJ56Ij2qijTzH4H2mhX6sZ mClJQJ62jnViV2dLe4zqa80VEYHr+XDl2sx7BjJv9gQetN4kkOYLsHTczpG1vpzYSoex NL6w== X-Gm-Message-State: AJaThX5SAvbu1FGtrZiEXmInTxWbQQ61SlyF8p68r0+laBF7ZLEn0zra 9P90+251nebYJ22bwyVz6HakLg== X-Google-Smtp-Source: AGs4zMbM2xrbkm90CU/Q/jBBhlpLBK10dScjNBGxWW1wpDqnglJbH2KKMXpXZ/pSBh7ZYWJjoVDI3Q== X-Received: by 10.101.68.129 with SMTP id l1mr12358191pgq.53.1512352238259; Sun, 03 Dec 2017 17:50:38 -0800 (PST) Received: from localhost.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id k23sm23503121pfj.22.2017.12.03.17.50.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 Dec 2017 17:50:37 -0800 (PST) From: Jia He To: dev@dpdk.org, Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , Thomas Monjalon Cc: konstantin.ananyev@intel.com, hemant.agrawal@nxp.com, Jia He Date: Sun, 3 Dec 2017 17:50:09 -0800 Message-Id: <1512352212-7191-1-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511748024-7245-1-git-send-email-hejianet@gmail.com> References: <1511748024-7245-1-git-send-email-hejianet@gmail.com> Subject: [dpdk-dev] [PATCH V7 0/3] support c11 memory model barrier in librte_ring 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: Mon, 04 Dec 2017 01:50:39 -0000 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 "y" only on arm64 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: 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_armv8a_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 | 186 ++++++++++++++++++++ lib/librte_ring/rte_ring_generic.h | 195 +++++++++++++++++++++ 7 files changed, 406 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