[dpdk-dev] [PATCH v5] pflock: implementation of phase-fair reader writer locks

Ananyev, Konstantin konstantin.ananyev at intel.com
Wed Apr 7 17:09:39 CEST 2021



> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Stephen Hemminger
> Sent: Friday, April 2, 2021 2:43 AM
> To: dev at dpdk.org; Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>
> Cc: Stephen Hemminger <stephen at networkplumber.org>
> Subject: [dpdk-dev] [PATCH v5] pflock: implementation of phase-fair reader writer locks
> 
> 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: Konstantin Ananyev <konstantin.ananyev at intel.com>

> 2.30.2



More information about the dev mailing list