From: fengchengwen <fengchengwen@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>, <dev@dpdk.org>
Cc: <anatoly.burakov@intel.com>
Subject: Re: [PATCH] doc/eal: add caveat about spinlocks from non-pinned threads
Date: Sat, 11 Jun 2022 09:55:00 +0800 [thread overview]
Message-ID: <afc7bde4-4cda-eaf9-f3cb-1fadb8f952d8@huawei.com> (raw)
In-Reply-To: <20220610152819.38737-1-stephen@networkplumber.org>
On 2022/6/10 23:28, Stephen Hemminger wrote:
> Need to warn users of DPDK spinlocks from non-pinned threads.
> This is similar wording to Linux documentation in pthread_spin_init.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> doc/guides/prog_guide/env_abstraction_layer.rst | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
> index 5f0748fba1c0..45d3de8d84f6 100644
> --- a/doc/guides/prog_guide/env_abstraction_layer.rst
> +++ b/doc/guides/prog_guide/env_abstraction_layer.rst
> @@ -797,6 +797,16 @@ Known Issues
>
> The debug statistics of rte_ring, rte_mempool and rte_timer are not supported in an unregistered non-EAL pthread.
>
> ++ locking
> +
> + If a pthread, that is not pinned to an lcore acquires a lock such as a
> + DPDK based lock (rte_spinlock, rte_rwlock, rte_ticketlock, rte_mcslock)
Some APIs inherently use rte_spinlock, just like rte_malloc/rte_eal_alarm_set,
Because DPDK API mainly use rte_spinlock to support thread-safty.
Suggest declare DPDK API mainly use rte_spinlock to support thread-safty, so
if the caller thread is not pinned to an lcore may encount a possibility of
large application delays.
> + then there is a possibility of large application delays.
> + The problem is that if a thread is scheduled off the CPU while it holds
> + a lock, then other threads will waste time spinning on the lock until
> + the lock holder is once more rescheduled and releases the lock.
> +
> +
> cgroup control
> ~~~~~~~~~~~~~~
>
>
next prev parent reply other threads:[~2022-06-11 1:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 15:28 Stephen Hemminger
2022-06-10 23:45 ` Tyler Retzlaff
2022-06-10 23:48 ` Tyler Retzlaff
2022-06-11 0:00 ` Stephen Hemminger
2022-06-11 1:55 ` fengchengwen [this message]
2022-06-11 3:33 ` Stephen Hemminger
2022-06-11 16:41 ` Mattias Rönnblom
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=afc7bde4-4cda-eaf9-f3cb-1fadb8f952d8@huawei.com \
--to=fengchengwen@huawei.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).