Re: [PATCH/RFC] Futex mmap_sem deadlock

David Howells
2005-02-23T11:43:00Z

Andrew Morton <akpm@osdl.org> wrote:

> wrt this down_read/down_write/down_read deadlock: iirc, the reason why
> down_write() takes precedence over down_read() is to avoid the permanent
> writer starvation which would occur if there is heavy down_read() traffic.

down_write() doesn't actually take precedence over down_read() as such. The
rwsems try to implement a strict FIFO queue (the fairness thing).

David