Re: [Patch] shm bug introduced with pagecache in 2.3.11

Jeremy Fitzhardinge (jeremy@goop.org)
Sat, 20 Nov 1999 18:35:39 -0800 (PST)


On 21-Nov-99 Linus Torvalds wrote:
> - if a writer is waiting for readers (contention_wr), then the writer
> will have already set the high bit, and a reader will know to wake it
> up because the rw-semaphore value will be negative when it does
> read_up().

I assume this also means that if a writer is blocked waiting for readers to
exit, subsequent readers entering the semaphore are also blocked. If you don't
do this, the writer can be starved forever by a continious stream of readers.

J

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/