From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, joyce.kong@arm.com,
konstantin.ananyev@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] eal/rwlock: add note about writer starvation
Date: Thu, 11 Feb 2021 23:51:37 +0100 [thread overview]
Message-ID: <6427760.fPJ3V7j96H@thomas> (raw)
In-Reply-To: <20210114165556.31353-1-stephen@networkplumber.org>
14/01/2021 17:55, Stephen Hemminger:
> The implementation of reader/writer locks in DPDK (from first release)
> is simple and fast. But it can lead to writer starvation issues.
>
> It is not easy to fix this without changing ABI and potentially
> breaking customer applications that are expect the unfair behavior.
typo: "are expect"
> The wikipedia page on reader-writer problem has a similar example
> which summarizes the problem pretty well.
Maybe add the URL in the commit message?
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> --- a/lib/librte_eal/include/generic/rte_rwlock.h
> +++ b/lib/librte_eal/include/generic/rte_rwlock.h
> + * Note: This version of reader/writer locks is not fair because
> + * readers do not block for pending writers. A stream of readers can
> + * subsequently lock out all potential writers and starve them.
> + * This is because after the first reader locks the resource,
> + * no writer can lock it. The writer will only be able to get the lock
> + * when it will only be released by the last reader.
You did not get review, probably because nobody was Cc'ed.
+Cc Honnappa, Joyce and Konstantin
next prev parent reply other threads:[~2021-02-11 22:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 19:13 [dpdk-dev] Reader-Writer lock starvation issues Stephen Hemminger
2021-01-08 21:27 ` Honnappa Nagarahalli
2021-01-11 11:52 ` Ferruh Yigit
2021-01-11 13:05 ` Honnappa Nagarahalli
2021-01-12 1:04 ` [dpdk-dev] [PATCH] eal/rwlock: add note about writer starvation Stephen Hemminger
2021-01-14 16:55 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
2021-02-11 22:51 ` Thomas Monjalon [this message]
2021-02-12 0:21 ` Honnappa Nagarahalli
2021-05-12 19:10 ` Thomas Monjalon
2021-11-08 10:18 ` Thomas Monjalon
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=6427760.fPJ3V7j96H@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
--cc=joyce.kong@arm.com \
--cc=konstantin.ananyev@intel.com \
--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).