From: Stephen Hemminger <stephen@networkplumber.org>
To: Orgad Shaneh <orgads@gmail.com>
Cc: Wei Hu <weh@microsoft.com>,
dev@dpdk.org, Long Li <longli@kernel.org>,
Aditya Garg <gargaditya@microsoft.com>
Subject: Re: [PATCH 2/2] net/mana: fix Rx interrupt enable failing on lock contention
Date: Tue, 10 Nov 2026 06:33:21 -0800 [thread overview]
Message-ID: <20261110063321.61b422cb@phoenix.local> (raw)
In-Reply-To: <20261109140207.4029126-1-orgads@gmail.com>
On Mon, 9 Nov 2026 14:02:07 +0000
Orgad Shaneh <orgads@gmail.com> 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;
> }
next prev parent reply other threads:[~2026-11-10 14:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 7:08 [PATCH 1/2] net/mana: fix Rx interrupt vector beyond device count Orgad Shaneh
2026-11-02 7:08 ` [PATCH 2/2] net/mana: fix Rx interrupt enable failing on lock contention Orgad Shaneh
2026-11-02 8:12 ` Stephen Hemminger
2026-11-02 8:27 ` Orgad Shaneh
2026-11-09 11:25 ` [EXTERNAL] " Wei Hu
2026-11-09 14:02 ` Orgad Shaneh
2026-11-10 14:33 ` Stephen Hemminger [this message]
2026-11-09 22:21 ` Stephen Hemminger
2026-11-10 9:42 ` [PATCH] net/mana: do not block Rx interrupt calls during a reset Orgad Shaneh
2026-11-10 14:47 ` Stephen Hemminger
2026-11-10 15:13 ` [PATCH v2] " Orgad Shaneh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110063321.61b422cb@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=gargaditya@microsoft.com \
--cc=longli@kernel.org \
--cc=orgads@gmail.com \
--cc=weh@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.