From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
=Oleksandr Natalenko <oleksandr@natalenko.name>,
Hannes Reinecke <hare@suse.com>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH v3 6/6] scsi-mq: Reduce suspend latency
Date: Mon, 25 Sep 2017 10:28:16 +0800 [thread overview]
Message-ID: <20170925022816.GC6434@ming.t460p> (raw)
In-Reply-To: <20170922221405.22091-7-bart.vanassche@wdc.com>
On Fri, Sep 22, 2017 at 03:14:05PM -0700, Bart Van Assche wrote:
> Avoid that it can take 200 ms too long to wait for 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 <bart.vanassche@wdc.com>
> Cc: Martin K. Petersen <martin.petersen@oracle.com>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <jthumshirn@suse.de>
> ---
> drivers/scsi/scsi_lib.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index ca84fd2d93ea..c5e66bb0c94d 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -2939,10 +2939,20 @@ scsi_device_quiesce(struct scsi_device *sdev)
> if (err)
> return err;
>
> - scsi_run_queue(q);
> - while (atomic_read(&sdev->device_busy)) {
> - msleep_interruptible(200);
> + if (q->mq_ops) {
> + /*
> + * Ensure write order of the PREEMPT_ONLY queue flag and
> + * q_usage_counter. See also blk_queue_enter().
> + */
> + smp_wmb();
> + blk_mq_freeze_queue(q);
> + blk_mq_unfreeze_queue(q);
> + } else {
> scsi_run_queue(q);
> + while (atomic_read(&sdev->device_busy)) {
> + msleep_interruptible(200);
> + scsi_run_queue(q);
> + }
Again, your patch doesn't fix scsi quiesce issue
on block legacy, either on suspend path or revalidate
path of transport spi.
--
Ming
next prev parent reply other threads:[~2017-09-25 2:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 22:13 [PATCH v3 0/6] Make SCSI device suspend and resume work reliably Bart Van Assche
2017-09-22 22:14 ` [PATCH v3 1/6] md: Make md resync and reshape threads freezable Bart Van Assche
2017-09-25 2:38 ` Ming Lei
2017-09-25 16:22 ` Bart Van Assche
2017-09-25 22:45 ` Ming Lei
2017-09-25 22:48 ` Bart Van Assche
2017-09-22 22:14 ` [PATCH v3 2/6] block: Convert RQF_PREEMPT into REQ_PREEMPT Bart Van Assche
2017-09-22 22:14 ` [PATCH v3 3/6] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag Bart Van Assche
2017-09-22 22:14 ` [PATCH v3 4/6] scsi: Set QUEUE_FLAG_PREEMPT_ONLY while quiesced Bart Van Assche
2017-09-22 22:14 ` [PATCH v3 5/6] block: Make SCSI device suspend and resume work reliably Bart Van Assche
2017-09-25 2:26 ` Ming Lei
2017-09-25 16:20 ` Bart Van Assche
2017-09-25 22:51 ` Ming Lei
2017-09-25 23:06 ` Bart Van Assche
2017-09-22 22:14 ` [PATCH v3 6/6] scsi-mq: Reduce suspend latency Bart Van Assche
2017-09-25 2:28 ` Ming Lei [this message]
2017-09-25 2:36 ` [PATCH v3 0/6] Make SCSI device suspend and resume work reliably Ming Lei
2017-09-25 16:17 ` Bart Van Assche
2017-09-25 16:20 ` hch
2017-09-26 9:11 ` 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=20170925022816.GC6434@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--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