From c4629b02c51f91f4aa66f07893efb362b5399f10 Mon Sep 17 00:00:00 2001 From: Feifei Wang Date: Wed, 20 Oct 2021 11:03:35 +0800 Subject: [PATCH] mcslock: use WFE in lock for aarch64 Instead of polling for previous lock holder unlocking, use wait_until_equal API. Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- lib/eal/include/generic/rte_mcslock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/eal/include/generic/rte_mcslock.h b/lib/eal/include/generic/rte_mcslock.h index 9f323bd2a2..34f33c64a5 100644 --- a/lib/eal/include/generic/rte_mcslock.h +++ b/lib/eal/include/generic/rte_mcslock.h @@ -84,8 +84,7 @@ rte_mcslock_lock(rte_mcslock_t **msl, rte_mcslock_t *me) * to spin on me->locked until the previous lock holder resets * the me->locked using mcslock_unlock(). */ - while (__atomic_load_n(&me->locked, __ATOMIC_ACQUIRE)) - rte_pause(); + rte_wait_until_equal_32((uint32_t *)&me->locked, 0, __ATOMIC_ACQUIRE); } /**