Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-23 Thread Waiman Long
On 07/23/2018 12:04 AM, Davidlohr Bueso wrote: > On Wed, 18 Jul 2018, Waiman Long wrote: > >> The key here is that we don't want other incoming readers to observe >> that there are waiters in the wait queue and hence have to go into the >> slowpath until the single waiter in the queue is sure that

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-23 Thread Waiman Long
On 07/23/2018 12:04 AM, Davidlohr Bueso wrote: > On Wed, 18 Jul 2018, Waiman Long wrote: > >> The key here is that we don't want other incoming readers to observe >> that there are waiters in the wait queue and hence have to go into the >> slowpath until the single waiter in the queue is sure that

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-22 Thread Davidlohr Bueso
On Wed, 18 Jul 2018, Waiman Long wrote: The key here is that we don't want other incoming readers to observe that there are waiters in the wait queue and hence have to go into the slowpath until the single waiter in the queue is sure that it probably will need to go to sleep if there is writer.

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-22 Thread Davidlohr Bueso
On Wed, 18 Jul 2018, Waiman Long wrote: The key here is that we don't want other incoming readers to observe that there are waiters in the wait queue and hence have to go into the slowpath until the single waiter in the queue is sure that it probably will need to go to sleep if there is writer.

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-18 Thread Waiman Long
On 07/18/2018 12:16 PM, Peter Zijlstra wrote: > On Fri, Jul 13, 2018 at 02:30:53PM -0400, Waiman Long wrote: >> It was discovered that a constant stream of readers might cause the >> count to go negative most of the time after an initial trigger by a >> writer even if no writer was present

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-18 Thread Waiman Long
On 07/18/2018 12:16 PM, Peter Zijlstra wrote: > On Fri, Jul 13, 2018 at 02:30:53PM -0400, Waiman Long wrote: >> It was discovered that a constant stream of readers might cause the >> count to go negative most of the time after an initial trigger by a >> writer even if no writer was present

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-18 Thread Peter Zijlstra
On Fri, Jul 13, 2018 at 02:30:53PM -0400, Waiman Long wrote: > It was discovered that a constant stream of readers might cause the > count to go negative most of the time after an initial trigger by a > writer even if no writer was present afterward. As a result, most of the > readers would have

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-18 Thread Peter Zijlstra
On Fri, Jul 13, 2018 at 02:30:53PM -0400, Waiman Long wrote: > It was discovered that a constant stream of readers might cause the > count to go negative most of the time after an initial trigger by a > writer even if no writer was present afterward. As a result, most of the > readers would have

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-18 Thread Waiman Long
On 07/13/2018 02:30 PM, Waiman Long wrote: > It was discovered that a constant stream of readers might cause the > count to go negative most of the time after an initial trigger by a > writer even if no writer was present afterward. As a result, most of the > readers would have to go through the

Re: [PATCH v2] locking/rwsem: Take read lock immediate if queue empty with no writer

2018-07-18 Thread Waiman Long
On 07/13/2018 02:30 PM, Waiman Long wrote: > It was discovered that a constant stream of readers might cause the > count to go negative most of the time after an initial trigger by a > writer even if no writer was present afterward. As a result, most of the > readers would have to go through the