Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Peter Zijlstra
On Tue, Sep 11, 2018 at 12:21:22PM -0700, Davidlohr Bueso wrote: > On Mon, 10 Sep 2018, Peter Zijlstra wrote: > > > [ RT has something along those lines, and I have half a patch that > > starts doing that too, but I never found enough time to really work on > > it :-( ] > > But don't rt rwsems

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Peter Zijlstra
On Tue, Sep 11, 2018 at 12:21:22PM -0700, Davidlohr Bueso wrote: > On Mon, 10 Sep 2018, Peter Zijlstra wrote: > > > [ RT has something along those lines, and I have half a patch that > > starts doing that too, but I never found enough time to really work on > > it :-( ] > > But don't rt rwsems

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Davidlohr Bueso
On Mon, 10 Sep 2018, Peter Zijlstra wrote: [ RT has something along those lines, and I have half a patch that starts doing that too, but I never found enough time to really work on it :-( ] But don't rt rwsems act pretty much like a regular mutex in that it only allows readers to nest, not

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Davidlohr Bueso
On Mon, 10 Sep 2018, Peter Zijlstra wrote: [ RT has something along those lines, and I have half a patch that starts doing that too, but I never found enough time to really work on it :-( ] But don't rt rwsems act pretty much like a regular mutex in that it only allows readers to nest, not

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Waiman Long
On 09/11/2018 04:17 AM, Peter Zijlstra wrote: > On Mon, Sep 10, 2018 at 10:15:50AM -0700, Davidlohr Bueso wrote: >> On Mon, 10 Sep 2018, Waiman Long wrote: >> >>> One major issue with a combined count/owner is that we may have to use >>> cmpxchg for reader lock which will certainly impact

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Waiman Long
On 09/11/2018 04:17 AM, Peter Zijlstra wrote: > On Mon, Sep 10, 2018 at 10:15:50AM -0700, Davidlohr Bueso wrote: >> On Mon, 10 Sep 2018, Waiman Long wrote: >> >>> One major issue with a combined count/owner is that we may have to use >>> cmpxchg for reader lock which will certainly impact

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Peter Zijlstra
On Mon, Sep 10, 2018 at 10:15:50AM -0700, Davidlohr Bueso wrote: > On Mon, 10 Sep 2018, Waiman Long wrote: > > > One major issue with a combined count/owner is that we may have to use > > cmpxchg for reader lock which will certainly impact reader-heavy > > workloads. I have also thought about

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-11 Thread Peter Zijlstra
On Mon, Sep 10, 2018 at 10:15:50AM -0700, Davidlohr Bueso wrote: > On Mon, 10 Sep 2018, Waiman Long wrote: > > > One major issue with a combined count/owner is that we may have to use > > cmpxchg for reader lock which will certainly impact reader-heavy > > workloads. I have also thought about

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Waiman Long
On 09/10/2018 01:15 PM, Davidlohr Bueso wrote: > On Mon, 10 Sep 2018, Waiman Long wrote: > >> One major issue with a combined count/owner is that we may have to use >> cmpxchg for reader lock which will certainly impact reader-heavy >> workloads. I have also thought about ways to compress the task

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Waiman Long
On 09/10/2018 01:15 PM, Davidlohr Bueso wrote: > On Mon, 10 Sep 2018, Waiman Long wrote: > >> One major issue with a combined count/owner is that we may have to use >> cmpxchg for reader lock which will certainly impact reader-heavy >> workloads. I have also thought about ways to compress the task

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Davidlohr Bueso
On Mon, 10 Sep 2018, Waiman Long wrote: One major issue with a combined count/owner is that we may have to use cmpxchg for reader lock which will certainly impact reader-heavy workloads. I have also thought about ways to compress the task pointer address so that it can use fewer bits and leave

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Davidlohr Bueso
On Mon, 10 Sep 2018, Waiman Long wrote: One major issue with a combined count/owner is that we may have to use cmpxchg for reader lock which will certainly impact reader-heavy workloads. I have also thought about ways to compress the task pointer address so that it can use fewer bits and leave

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Waiman Long
On 09/10/2018 05:31 AM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 04:18:34PM -0400, Waiman Long wrote: >> Currently, when a reader acquires a lock, it only sets the >> RWSEM_READER_OWNED bit in the owner field. The other bits are simply >> not used. When debugging hanging cases involving

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Waiman Long
On 09/10/2018 05:31 AM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 04:18:34PM -0400, Waiman Long wrote: >> Currently, when a reader acquires a lock, it only sets the >> RWSEM_READER_OWNED bit in the owner field. The other bits are simply >> not used. When debugging hanging cases involving

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 04:18:34PM -0400, Waiman Long wrote: > Currently, when a reader acquires a lock, it only sets the > RWSEM_READER_OWNED bit in the owner field. The other bits are simply > not used. When debugging hanging cases involving rwsems and readers, > the owner value does not provide

Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-10 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 04:18:34PM -0400, Waiman Long wrote: > Currently, when a reader acquires a lock, it only sets the > RWSEM_READER_OWNED bit in the owner field. The other bits are simply > not used. When debugging hanging cases involving rwsems and readers, > the owner value does not provide

[PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-06 Thread Waiman Long
Currently, when a reader acquires a lock, it only sets the RWSEM_READER_OWNED bit in the owner field. The other bits are simply not used. When debugging hanging cases involving rwsems and readers, the owner value does not provide much useful information at all. This patch modifies the current

[PATCH] locking/rwsem: Make owner store task pointer of last owning reader

2018-09-06 Thread Waiman Long
Currently, when a reader acquires a lock, it only sets the RWSEM_READER_OWNED bit in the owner field. The other bits are simply not used. When debugging hanging cases involving rwsems and readers, the owner value does not provide much useful information at all. This patch modifies the current