DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] lib/rcu: use rte atomic thread fence wrapper instead
@ 2020-12-21  7:38 Joyce Kong
  2021-01-11 14:41 ` David Marchand
  0 siblings, 1 reply; 2+ messages in thread
From: Joyce Kong @ 2020-12-21  7:38 UTC (permalink / raw)
  To: honnappa.nagarahalli, ruifeng.wang; +Cc: dev, nd

Use rte_atomic_thread_fence wrapper which has been provided for
__atomic_thread_fence builtins to support optimized code for
__ATOMIC_SEQ_CST memory order on x86 platforms.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_rcu/rte_rcu_qsbr.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
index fa2b881bd..18811c1cc 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.h
+++ b/lib/librte_rcu/rte_rcu_qsbr.h
@@ -329,12 +329,7 @@ rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)
 	 * writer might not see that the reader is online, even though
 	 * the reader is referencing the shared data structure.
 	 */
-#ifdef RTE_ARCH_X86_64
-	/* rte_smp_mb() for x86 is lighter */
-	rte_smp_mb();
-#else
-	__atomic_thread_fence(__ATOMIC_SEQ_CST);
-#endif
+	rte_atomic_thread_fence(__ATOMIC_SEQ_CST);
 }
 
 /**
-- 
2.29.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH v1] lib/rcu: use rte atomic thread fence wrapper instead
  2020-12-21  7:38 [dpdk-dev] [PATCH v1] lib/rcu: use rte atomic thread fence wrapper instead Joyce Kong
@ 2021-01-11 14:41 ` David Marchand
  0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2021-01-11 14:41 UTC (permalink / raw)
  To: Joyce Kong
  Cc: Honnappa Nagarahalli, Ruifeng Wang (Arm Technology China), dev, nd

On Mon, Dec 21, 2020 at 8:40 AM Joyce Kong <joyce.kong@arm.com> wrote:
>
> Use rte_atomic_thread_fence wrapper which has been provided for
> __atomic_thread_fence builtins to support optimized code for
> __ATOMIC_SEQ_CST memory order on x86 platforms.
>
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

Applied, thanks.

-- 
David Marchand


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-11 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21  7:38 [dpdk-dev] [PATCH v1] lib/rcu: use rte atomic thread fence wrapper instead Joyce Kong
2021-01-11 14:41 ` David Marchand

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git