On Mon, 9 Nov 2026 14:02:07 +0000
Orgad Shaneh <[email protected]> wrote:
> static int
> mana_reset_lock(struct mana_priv *priv)
> {
> while (pthread_mutex_trylock(&priv->reset_ops_lock)) {
> if (rte_atomic_load_explicit(&priv->dev_state,
> rte_memory_order_relaxed) != MANA_DEV_ACTIVE)
> return -EBUSY;
> rte_pause();
> }
You need to use pthread_yield(), rte_pause only generates a CPU rep nop
which yields to other hyper thread if it is another process need
to cause yield in cpu scheduler.
>
> if (rte_atomic_load_explicit(&priv->dev_state,
> rte_memory_order_acquire) != MANA_DEV_ACTIVE) {
> pthread_mutex_unlock(&priv->reset_ops_lock);
> return -EBUSY;
> }
> return 0;
> }