From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "hch@lst.de" <hch@lst.de>, "axboe@kernel.dk" <axboe@kernel.dk>,
"hare@suse.com" <hare@suse.com>,
"jthumshirn@suse.de" <jthumshirn@suse.de>,
"oleksandr@natalenko.name" <oleksandr@natalenko.name>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH v2 4/4] scsi-mq: Reduce suspend latency
Date: Fri, 22 Sep 2017 07:53:28 +0800 [thread overview]
Message-ID: <20170921235327.GH6854@ming.t460p> (raw)
In-Reply-To: <1506036752.2521.32.camel@wdc.com>
On Thu, Sep 21, 2017 at 11:32:33PM +0000, 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 +0000, 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(&sdev->device_busy)) {
> > > > > + msleep_interruptible(200);
> > > > > + scsi_run_queue(q);
> > > > > + }
> > > >
> > > > Are you sure only blk-mq need to drain queue? We need
> > > > to do that for block legacy too.
> > >
> > > The code above your comment drains the queue for the legacy block layer.
> >
> > That is just draining the requests dispatched to SCSI layer, and there
> > might be lots of requests in block I/O scheduler queue or requeue or
> > whatever.
>
> There is no requeue list for the legacy block layer. There is only a requeue
> list for blk-mq.
>
> Waiting for I/O requests that are in scheduler queues is not the purpose of
> scsi_quiesce_device(). The purpose of that function is to wait for requests
> that have already been started. The sdev->device_busy counter represents the
> number of started requests so waiting until that counter has reached zero is
> sufficient.
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 sorry you still don't
understand it.
--
Ming
next prev parent reply other threads:[~2017-09-21 23:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 21:22 [PATCH v2 0/4] Make SCSI device suspend and resume work reliably Bart Van Assche
2017-09-21 21:22 ` [PATCH v2 1/4] block: Convert RQF_PREEMPT into REQ_PREEMPT Bart Van Assche
2017-09-21 21:22 ` [PATCH v2 2/4] block: Add the QUEUE_PREEMPT_ONLY request queue flag Bart Van Assche
2017-09-21 21:22 ` [PATCH v2 3/4] block, scsi: Make SCSI device suspend and resume work reliably Bart Van Assche
2017-09-21 22:04 ` Ming Lei
2017-09-21 22:44 ` Bart Van Assche
2017-09-21 21:22 ` [PATCH v2 4/4] scsi-mq: Reduce suspend latency Bart Van Assche
2017-09-21 22:06 ` Ming Lei
2017-09-21 22:43 ` Bart Van Assche
2017-09-21 23:25 ` Ming Lei
2017-09-21 23:32 ` Bart Van Assche
2017-09-21 23:53 ` Ming Lei [this message]
2017-09-21 23:56 ` Bart Van Assche
2017-09-22 0:03 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170921235327.GH6854@ming.t460p \
--to=ming.lei@redhat.com \
--cc=Bart.VanAssche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=oleksandr@natalenko.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox