Messages in this thread | | | Subject | Re: Mutex vs semaphores scheduler bug | From | Peter Zijlstra <> | Date | Sat, 17 Oct 2009 17:32:07 +0200 |
| |
On Fri, 2009-10-16 at 00:44 +0100, David Howells wrote: > Peter Zijlstra <peterz@infradead.org> wrote: > > > The problem appears to be that rwsem doesn't allow lock-stealing > > With good reason. rwsems can be read or write locked for a long time - so if > readers can jump the queue on read-locked rwsems, then writer starvation is a > real possibility. I carefully implemented it so that it is a strict FIFO to > avoid certain problems I was having.
Well, it kinda sucks that rwsem is slower than a mutex.
What about allowing writer stealing when the next contending task is a writer?
| |