Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-10 Thread Bart Van Assche
On Thu, 2017-08-10 at 11:14 +0900, Damien Le Moal wrote: > I am currently trying different approaches for this. In the mean time, I > would like to see the unlock change patch be applied to fix the deadlock > problem. Hello Damien, That approach sounds fine to me. Bart.

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-09 Thread Damien Le Moal
back again the (1) or (2) cases, without >>> any change in the order. Isnt't it ? >> >> Hello Damien, >> >> Commands that get requeued are not reinserted at their original position >> in the request queue but usually at a different position. This is what makes &g

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-09 Thread Damien Le Moal
llo Damien, > > Commands that get requeued are not reinserted at their original position > in the request queue but usually at a different position. This is what makes > requeueing cause request reordering. Anyway, can you check whether replacing > patch "sd_zbc: Write unlock zo

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-09 Thread Bart Van Assche
but usually at a different position. This is what makes requeueing cause request reordering. Anyway, can you check whether replacing patch "sd_zbc: Write unlock zone from sd_uninit_cmnd()" with the (untested) patch below does not trigger any lockups and prevents request reordering? Si

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-08 Thread Damien Le Moal
On 8/9/17 13:15, Bart Van Assche wrote: > On Wed, 2017-08-09 at 13:07 +0900, Damien Le Moal wrote: >> >> On 8/9/17 12:57, Bart Van Assche wrote: >>> On Wed, 2017-08-09 at 11:47 +0900, Damien Le Moal wrote: On 8/9/17 11:19, Damien Le Moal wrote: > On 8/9/17 00:07, Bart Van Assche wrote:

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-08 Thread Bart Van Assche
On Wed, 2017-08-09 at 13:07 +0900, Damien Le Moal wrote: > > On 8/9/17 12:57, Bart Van Assche wrote: > > On Wed, 2017-08-09 at 11:47 +0900, Damien Le Moal wrote: > > > On 8/9/17 11:19, Damien Le Moal wrote: > > > > On 8/9/17 00:07, Bart Van Assche wrote: > > > > > On Tue, 2017-08-08 at 13:17

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-08 Thread Damien Le Moal
On 8/9/17 12:57, Bart Van Assche wrote: > On Wed, 2017-08-09 at 11:47 +0900, Damien Le Moal wrote: >> On 8/9/17 11:19, Damien Le Moal wrote: >>> On 8/9/17 00:07, Bart Van Assche wrote: On Tue, 2017-08-08 at 13:17 +0900, Damien Le Moal wrote: > acquired the lock completes can cause

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-08 Thread Bart Van Assche
On Wed, 2017-08-09 at 11:47 +0900, Damien Le Moal wrote: > On 8/9/17 11:19, Damien Le Moal wrote: > > On 8/9/17 00:07, Bart Van Assche wrote: > > > On Tue, 2017-08-08 at 13:17 +0900, Damien Le Moal wrote: > > > > acquired the lock completes can cause deadlocks with scsi-mq due to > > > > potential

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-08 Thread Damien Le Moal
Bart, On 8/9/17 11:19, Damien Le Moal wrote: > Bart, > > On 8/9/17 00:07, Bart Van Assche wrote: >> On Tue, 2017-08-08 at 13:17 +0900, Damien Le Moal wrote: >>> Releasing the write lock of a zone when the write commnand that >> >>

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-08 Thread Damien Le Moal
Bart, On 8/9/17 00:07, Bart Van Assche wrote: > On Tue, 2017-08-08 at 13:17 +0900, Damien Le Moal wrote: >> Releasing the write lock of a zone when the write commnand that > > command?

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-08 Thread Bart Van Assche
On Tue, 2017-08-08 at 13:17 +0900, Damien Le Moal wrote: > Releasing the write lock of a zone when the write commnand that command? > acquired the lock completes can cause deadlocks

[PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-07 Thread Damien Le Moal
Releasing the write lock of a zone when the write commnand that acquired the lock completes can cause deadlocks with scsi-mq due to potential queue reordering if the lock owning request is requeued and not executed. Since sd_uninit_cmnd() is always called when a request is requeued, call