Re: [PATCH v2 11/13] rwsem: implement support for write lock stealing on the fastpath

2013-03-28 Thread Peter Hurley
On Fri, 2013-03-15 at 03:54 -0700, Michel Lespinasse wrote: > When we decide to wake up readers, we must first grant them as many > read locks as necessary, and then actually wake up all these readers. > But in order to know how many read shares to grant, we must first > count the readers at the h

[PATCH v2 11/13] rwsem: implement support for write lock stealing on the fastpath

2013-03-15 Thread Michel Lespinasse
When we decide to wake up readers, we must first grant them as many read locks as necessary, and then actually wake up all these readers. But in order to know how many read shares to grant, we must first count the readers at the head of the queue. This might take a while if there are many readers,