From: Steven Lariau Date: Fri, 25 Sep 2020 17:43:36 +0000 (+0100) Subject: stack: remove acquire fence on push X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9e90bc9c712c4afc96ad9d08a1c9fbc87f481513;p=dpdk.git stack: remove acquire fence on push 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 --- diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h index 1e0ea0bef4..82b7287f19 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. */