Re: [PATCH v2 4/4] scsi-mq: Reduce suspend latency

2017-09-21 Thread Ming Lei
On Thu, Sep 21, 2017 at 11:56:33PM +, Bart Van Assche wrote: > On Fri, 2017-09-22 at 07:53 +0800, Ming Lei wrote: > > Then that is simply not enough since the issue is that request pool can > > be used up easily when SCSI device is quiesced, then no request is left > > for RQF_PREEMPT(PM), and

Re: [PATCH v2 4/4] scsi-mq: Reduce suspend latency

2017-09-21 Thread Bart Van Assche
On Fri, 2017-09-22 at 07:53 +0800, Ming Lei wrote: > Then that is simply not enough since the issue is that request pool can > be used up easily when SCSI device is quiesced, then no request is left > for RQF_PREEMPT(PM), and I/O hang is triggered. > > It has been discussed for long time, I am

Re: [PATCH v2 4/4] scsi-mq: Reduce suspend latency

2017-09-21 Thread Ming Lei
On Thu, Sep 21, 2017 at 11:32:33PM +, Bart Van Assche wrote: > On Fri, 2017-09-22 at 07:25 +0800, Ming Lei wrote: > > On Thu, Sep 21, 2017 at 10:43:26PM +, Bart Van Assche wrote: > > > On Fri, 2017-09-22 at 06:06 +0800, Ming Lei wrote: > > > > On Thu, Sep 21, 2017 at 02:22:55PM -0700, Bart

Re: [PATCH v2 4/4] scsi-mq: Reduce suspend latency

2017-09-21 Thread Bart Van Assche
On Fri, 2017-09-22 at 07:25 +0800, Ming Lei wrote: > On Thu, Sep 21, 2017 at 10:43:26PM +, Bart Van Assche wrote: > > On Fri, 2017-09-22 at 06:06 +0800, Ming Lei wrote: > > > On Thu, Sep 21, 2017 at 02:22:55PM -0700, Bart Van Assche wrote: > > > > + } else { > > > >

Re: [PATCH v2 4/4] scsi-mq: Reduce suspend latency

2017-09-21 Thread Ming Lei
On Thu, Sep 21, 2017 at 10:43:26PM +, Bart Van Assche wrote: > On Fri, 2017-09-22 at 06:06 +0800, Ming Lei wrote: > > On Thu, Sep 21, 2017 at 02:22:55PM -0700, Bart Van Assche wrote: > > > + } else { > > > scsi_run_queue(q); > > > + while (atomic_read(>device_busy)) { > > > +

Re: [PATCH v2 4/4] scsi-mq: Reduce suspend latency

2017-09-21 Thread Bart Van Assche
On Fri, 2017-09-22 at 06:06 +0800, Ming Lei wrote: > On Thu, Sep 21, 2017 at 02:22:55PM -0700, Bart Van Assche wrote: > > + } else { > > scsi_run_queue(q); > > + while (atomic_read(>device_busy)) { > > + msleep_interruptible(200); > > +

[PATCH v2 4/4] scsi-mq: Reduce suspend latency

2017-09-21 Thread Bart Van Assche
Avoid that it can take 200 ms too long to wait for ongoing requests to finish. Note: blk_mq_freeze_queue() uses a wait queue to wait for ongoing requests to finish. Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: Ming Lei