Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2007 00:24:59 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        dima <_pppp@mail.ru>
Cc:        arch@freebsd.org
Subject:   Re: Re[2]: rwlocks, correctness over speed.
Message-ID:  <20071123082459.GO44563@elvis.mu.org>
In-Reply-To: <E1IvIWg-0007u7-00._pppp-mail-ru@f41.mail.ru>
References:  <20071122195823.GH44563@elvis.mu.org> <E1IvIWg-0007u7-00._pppp-mail-ru@f41.mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
* dima <_pppp@mail.ru> [071122 19:20] wrote:
> 
> The current design is probably fast, but incorrect. Writers will be starved even if we deny recursive read-locks. There are 2 ways to fix that:
> 1. Forbid recursive read-locks *and* add a flag which would mean "a writer is waiting" (and prohibit future read-lock acquisition).

Yes, this would be done later.

> 2. Allow recursive read-locks, add the same flag, and add an accounting of all the current readers (so, only recursive read-lock acquisitions would be accepted if a writer is waiting).

Probably not going to happen as the extra bookkeeping is supposedly
cost prohibitive.

-Alfred



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071123082459.GO44563>