Ben LaHaise wrote:
> On Mon, 26 Jun 2000, Tigran Aivazian wrote:
> > I know that Linux read-write semaphores implementation is quite clever
> > with respect to putting the new readers to queue behind the waiting
> > writer. Now, is something similar true for read-write spinlocks also?
> Not at present. Right now what happens for the contended lock case is
> that the writer will release its bias of the lock and wait for the lock to
> be released by all readers before attempting to reaquire the lock. Is
> this the right thing to do? I'm not certain.
But I'm certain :-(
The "no writer in interrupt" rule for rw spinlocks forces us to release
the bias, and without that rule we would need to add lots of _irqsave()
And IIRC your initial rw lock rewrite also held the lock bias, and you
had to change it. Perhaps you should add a comment?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:09 EST