[dpdk-dev] [PATCH v5] pflock: implementation of phase-fair reader writer locks
David Marchand
david.marchand at redhat.com
Wed Apr 14 17:36:21 CEST 2021
On Wed, Apr 7, 2021 at 5:10 PM Ananyev, Konstantin
<konstantin.ananyev at intel.com> wrote:
> > This is a new type of reader-writer lock that provides better fairness
> > guarantees which better suited for typical DPDK applications.
> > A pflock has two ticket pools, one for readers and one
> > for writers.
> >
> > Phase fair reader writer locks ensure that neither reader nor writer will be
> > starved. Neither reader or writer are preferred, they execute in
> > alternating phases. All operations of the same type (reader or writer)
> > that acquire the lock are handled in FIFO order. Write
> > operations are exclusive, and multiple read operations can be run
> > together (until a write arrives).
> >
> > A similar implementation is in Concurrency Kit package in FreeBSD.
> > For more information see:
> > "Reader-Writer Synchronization for Shared-Memory Multiprocessor
> > Real-Time Systems",
> > http://www.cs.unc.edu/~anderson/papers/ecrts09b.pdf
> >
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
I added a short release note update.
I chose "phase-fair" as the unique way to identify this new API.
I updated the patch with this for consistency.
I put this new API under the EAL common code section in MAINTAINERS.
A comparison on when/why to prefer this over the existing locks would
be helpful in the developer guide.
There is also a question from Honnappa about test validation.
Can you follow up on those two points?
Applied, thanks.
--
David Marchand
More information about the dev
mailing list