Linux block layer
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@fb.com>,
	linux-block@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
	Ming Lei <ming.lei@redhat.com>
Subject: [PATCH v3 7/9] blk-mq: don't stop queue for quiescing
Date: Wed, 31 May 2017 20:37:04 +0800	[thread overview]
Message-ID: <20170531123706.20885-8-ming.lei@redhat.com> (raw)
In-Reply-To: <20170531123706.20885-1-ming.lei@redhat.com>

Queue can be started by other blk-mq APIs and can be used in
different cases, this limits uses of blk_mq_quiesce_queue()
if it is based on stopping queue, and make its usage very
difficult, especially users have to use the stop queue APIs
carefully for avoiding to break blk_mq_quiesce_queue().

We have applied the QUIESCED flag for draining and blocking
dispatch, so it isn't necessary to stop queue any more.

After stopping queue is removed, blk_mq_quiesce_queue() can
be used safely and easily, then users won't worry about queue
restarting during quiescing at all.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 block/blk-mq.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 1faddaf005e2..bcff1b184bbb 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -169,8 +169,6 @@ void blk_mq_quiesce_queue(struct request_queue *q)
 	unsigned int i;
 	bool rcu = false;
 
-	__blk_mq_stop_hw_queues(q, true);
-
 	spin_lock_irq(q->queue_lock);
 	queue_flag_set(QUEUE_FLAG_QUIESCED, q);
 	spin_unlock_irq(q->queue_lock);
@@ -199,8 +197,6 @@ void blk_mq_unquiesce_queue(struct request_queue *q)
 	queue_flag_clear(QUEUE_FLAG_QUIESCED, q);
 	spin_unlock_irq(q->queue_lock);
 
-	blk_mq_start_stopped_hw_queues(q, true);
-
 	wake_up_all(&q->quiesce_wq);
 }
 EXPORT_SYMBOL_GPL(blk_mq_unquiesce_queue);
-- 
2.9.4

  parent reply	other threads:[~2017-05-31 12:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 12:36 [PATCH v3 0/8] blk-mq: fix & improve queue quiescing Ming Lei
2017-05-31 12:36 ` [PATCH v3 1/9] blk-mq: introduce blk_mq_unquiesce_queue Ming Lei
2017-05-31 12:36 ` [PATCH v3 2/9] block: introduce flag of QUEUE_FLAG_QUIESCED Ming Lei
2017-05-31 12:37 ` [PATCH v3 3/9] blk-mq: use the introduced blk_mq_unquiesce_queue() Ming Lei
2017-05-31 15:21   ` Bart Van Assche
2017-06-01  0:54     ` Ming Lei
2017-06-01 23:09       ` Bart Van Assche
2017-06-02  2:00         ` Ming Lei
2017-06-02 22:19           ` Bart Van Assche
2017-05-31 12:37 ` [PATCH v3 4/9] nvme: host: unquiesce queue in nvme_kill_queues() Ming Lei
2017-05-31 12:37 ` [PATCH v3 5/9] blk-mq: fix blk_mq_quiesce_queue Ming Lei
2017-05-31 15:37   ` Bart Van Assche
2017-06-01  2:21     ` Ming Lei
2017-06-01 23:19       ` Bart Van Assche
2017-06-02  2:02         ` Ming Lei
2017-05-31 12:37 ` [PATCH v3 6/9] blk-mq: update comments on blk_mq_quiesce_queue() Ming Lei
2017-05-31 12:37 ` Ming Lei [this message]
2017-05-31 12:37 ` [PATCH v3 8/9] blk-mq: clarify dispatch may not be drained/blocked by stopping queue Ming Lei
2017-05-31 12:37 ` [PATCH v3 9/9] Revert "blk-mq: don't use sync workqueue flushing from drivers" 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=20170531123706.20885-8-ming.lei@redhat.com \
    --to=ming.lei@redhat.com \
    --cc=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    /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