[RFC] rwlock: prevent readers from starving writers
Stephen Hemminger
stephen at networkplumber.org
Sat Jul 9 18:25:28 CEST 2022
On Sat, 9 Jul 2022 00:04:27 +0200
Morten Brørup <mb at smartsharesystems.com> wrote:
> Always the creative mind, Stephen. :-)
>
> You might consider adding/updating even more comments.
>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
The motivation is that our work load is reader/writer lock heavy
with small number of threads. Therefore the number of atomic operations
per lock matters, but starving is bad. And any compare-exchange on ARM
is expensive and should be avoided if possible.
The concept here came from this great page.
https://locklessinc.com/articles/locks/
Will add link in next version.
More information about the dev
mailing list