Re: [PATCH v8 07/19] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-06-05 Thread Yuyang Du
Hi Waiman, On Wed, 5 Jun 2019 at 00:00, Waiman Long wrote: > With my patchset applied, the reader-writer ordering is still supposed > to be preserved. Of course, there can be exceptions depending on the > exact timing, but we can't rely on that to prevent deadlock. This is exactly what I want

Re: [PATCH v8 07/19] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-06-04 Thread Waiman Long
On 6/4/19 5:12 AM, Boqun Feng wrote: > On Tue, Jun 04, 2019 at 11:26:30AM +0800, Yuyang Du wrote: >> On Tue, 4 Jun 2019 at 11:03, Yuyang Du wrote: >>> Hi Waiman, >>> >>> On Tue, 21 May 2019 at 05:01, Waiman Long wrote: Because of writer lock stealing, it is possible that a constant

Re: [PATCH v8 07/19] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-06-04 Thread Waiman Long
On 6/3/19 11:26 PM, Yuyang Du wrote: > On Tue, 4 Jun 2019 at 11:03, Yuyang Du wrote: >> Hi Waiman, >> >> On Tue, 21 May 2019 at 05:01, Waiman Long wrote: >>> Because of writer lock stealing, it is possible that a constant >>> stream of incoming writers will cause a waiting writer or reader to

Re: [PATCH v8 07/19] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-06-04 Thread Boqun Feng
On Tue, Jun 04, 2019 at 11:26:30AM +0800, Yuyang Du wrote: > On Tue, 4 Jun 2019 at 11:03, Yuyang Du wrote: > > > > Hi Waiman, > > > > On Tue, 21 May 2019 at 05:01, Waiman Long wrote: > > > > > > Because of writer lock stealing, it is possible that a constant > > > stream of incoming writers will

Re: [PATCH v8 07/19] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-06-03 Thread Yuyang Du
On Tue, 4 Jun 2019 at 11:03, Yuyang Du wrote: > > Hi Waiman, > > On Tue, 21 May 2019 at 05:01, Waiman Long wrote: > > > > Because of writer lock stealing, it is possible that a constant > > stream of incoming writers will cause a waiting writer or reader to > > wait indefinitely leading to lock

Re: [PATCH v8 07/19] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-06-03 Thread Yuyang Du
Hi Waiman, On Tue, 21 May 2019 at 05:01, Waiman Long wrote: > > Because of writer lock stealing, it is possible that a constant > stream of incoming writers will cause a waiting writer or reader to > wait indefinitely leading to lock starvation. > > This patch implements a lock handoff mechanism

[PATCH v8 07/19] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-05-20 Thread Waiman Long
Because of writer lock stealing, it is possible that a constant stream of incoming writers will cause a waiting writer or reader to wait indefinitely leading to lock starvation. This patch implements a lock handoff mechanism to disable lock stealing and force lock handoff to the first waiter or