Re: [PATCH] locking/rwsem: Add reader owned state to the owner field

2016-05-04 Thread Waiman Long
On 05/04/2016 01:52 PM, Jason Low wrote: On Wed, 2016-05-04 at 13:27 -0400, Waiman Long wrote: On 05/03/2016 08:21 PM, Davidlohr Bueso wrote: On Wed, 27 Apr 2016, Waiman Long wrote: static bool rwsem_optimistic_spin(struct rw_semaphore *sem) @@ -378,7 +367,8 @@ static bool rwsem_optimistic_spi

Re: [PATCH] locking/rwsem: Add reader owned state to the owner field

2016-05-04 Thread Jason Low
On Wed, 2016-05-04 at 13:27 -0400, Waiman Long wrote: > On 05/03/2016 08:21 PM, Davidlohr Bueso wrote: > > On Wed, 27 Apr 2016, Waiman Long wrote: > >> static bool rwsem_optimistic_spin(struct rw_semaphore *sem) > >> @@ -378,7 +367,8 @@ static bool rwsem_optimistic_spin(struct > >> rw_semaphore *s

Re: [PATCH] locking/rwsem: Add reader-owned state to the owner field

2016-05-04 Thread Waiman Long
On 05/03/2016 08:21 PM, Davidlohr Bueso wrote: On Wed, 27 Apr 2016, Waiman Long wrote: This patch adds a new state RWSEM_READER_OWNED to the owner field to indicate that readers currently own the lock. This enables us to address the following 2 issues in the rwsem optimistic spinning code: 1)

Re: [PATCH] locking/rwsem: Add reader-owned state to the owner field

2016-05-03 Thread Davidlohr Bueso
On Wed, 27 Apr 2016, Waiman Long wrote: This patch adds a new state RWSEM_READER_OWNED to the owner field to indicate that readers currently own the lock. This enables us to address the following 2 issues in the rwsem optimistic spinning code: 1) rwsem_can_spin_on_owner() will disallow optimist

[PATCH] locking/rwsem: Add reader-owned state to the owner field

2016-04-27 Thread Waiman Long
This patch adds a new state RWSEM_READER_OWNED to the owner field to indicate that readers currently own the lock. This enables us to address the following 2 issues in the rwsem optimistic spinning code: 1) rwsem_can_spin_on_owner() will disallow optimistic spinning if the owner field is NULL