Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-05 Thread Maxim Uvarov
merged to api-next. On 11/03/2015 12:53, Nicolas Morey-Chaisemartin wrote: Also, why is this only applied to API-NEXT ? Doesn't master have the same "deadlock" issue? I used api-next as staging branch for patches which do not have anybody else Review-by: Will merge that patches to master

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Bill Fischofer
It's fixing the deadlock issue reported by Carl where A is queueing to B and B is queuing to A. The previous scheme relied on a statistical locking strategy that was prone to stalls, especially on uniprocessor systems. Your suggestion solves this issue and is also simpler and faster. Concurrent w

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Nicolas Morey-Chaisemartin
On 11/03/2015 10:21 AM, Nicolas Morey-Chaisemartin wrote: > > On 11/02/2015 06:11 PM, Bill Fischofer wrote: >> Enqueueing to ordered queues requires two locks (source and target >> queues). Since any queue can be either source or target, queues do not >> have a natural locking hierarchy. Create o

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Bill Fischofer
On Tue, Nov 3, 2015 at 3:21 AM, Nicolas Morey-Chaisemartin wrote: > > > On 11/02/2015 06:11 PM, Bill Fischofer wrote: > > Enqueueing to ordered queues requires two locks (source and target > > queues). Since any queue can be either source or target, queues do not > > have a natural locking hierar

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Nicolas Morey-Chaisemartin
Also, why is this only applied to API-NEXT ? Doesn't master have the same "deadlock" issue? On 11/02/2015 06:11 PM, Bill Fischofer wrote: > Enqueueing to ordered queues requires two locks (source and target > queues). Since any queue can be either source or target, queues do not > have a natural

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Nicolas Morey-Chaisemartin
On 11/02/2015 06:11 PM, Bill Fischofer wrote: > Enqueueing to ordered queues requires two locks (source and target > queues). Since any queue can be either source or target, queues do not > have a natural locking hierarchy. Create one by using the address of > the qentry as the lock order. > > Th

[lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-02 Thread Bill Fischofer
Enqueueing to ordered queues requires two locks (source and target queues). Since any queue can be either source or target, queues do not have a natural locking hierarchy. Create one by using the address of the qentry as the lock order. This addresses the aspect of Bug https://bugs.linaro.org/show