From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 87050A04C0; Fri, 25 Sep 2020 19:44:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 831CF1E9EA; Fri, 25 Sep 2020 19:44:17 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 634611E9D1 for ; Fri, 25 Sep 2020 19:44:12 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D26A01396; Fri, 25 Sep 2020 10:44:10 -0700 (PDT) Received: from localhost.localdomain (unknown [10.57.54.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D967A3F718; Fri, 25 Sep 2020 10:44:09 -0700 (PDT) From: Steven Lariau To: Gage Eads , Olivier Matz Cc: dev@dpdk.org, nd@arm.com, Steven Lariau Date: Fri, 25 Sep 2020 18:43:36 +0100 Message-Id: <20200925174340.10014-3-steven.lariau@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200925174340.10014-1-steven.lariau@arm.com> References: <20200911152938.8019-1-steven.lariau@arm.com> <20200925174340.10014-1-steven.lariau@arm.com> Subject: [dpdk-dev] [PATCH v2 2/5] lib/stack: remove push acquire fence 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" An acquire fence is used to make sure loads after the fence can observe all store operations before a specific store-release. But push doesn't read any data, except for the head which is part of a CAS operation (the items on the list are not read). So there is no need for the acquire barrier. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang Acked-by: Gage Eads --- lib/librte_stack/rte_stack_lf_c11.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h index 1e0ea0bef..82b7287f1 100644 --- a/lib/librte_stack/rte_stack_lf_c11.h +++ b/lib/librte_stack/rte_stack_lf_c11.h @@ -44,12 +44,6 @@ __rte_stack_lf_push_elems(struct rte_stack_lf_list *list, do { struct rte_stack_lf_head new_head; - /* Use an acquire fence to establish a synchronized-with - * relationship between the list->head load and store-release - * operations (as part of the rte_atomic128_cmp_exchange()). - */ - __atomic_thread_fence(__ATOMIC_ACQUIRE); - /* Swing the top pointer to the first element in the list and * make the last element point to the old top. */ -- 2.17.1