From: Keith Busch <kbusch@kernel.org>
To: Hannes Reinecke <hare@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
Ming Lei <tom.leiming@gmail.com>,
linux-block@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] block: don't call blk_mq_run_hw_queues() for dead or dying queues
Date: Tue, 26 Mar 2019 18:05:00 -0600 [thread overview]
Message-ID: <20190327000500.GD4328@localhost.localdomain> (raw)
In-Reply-To: <20190326120712.41657-1-hare@suse.de>
On Tue, Mar 26, 2019 at 01:07:12PM +0100, Hannes Reinecke wrote:
> When a queue is dying or dead there is no point in calling
> blk_mq_run_hw_queues() in blk_mq_unquiesce_queue(); in fact, doing
> so might crash the machine as the queue structures are in the
> process of being deleted.
>
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
> block/blk-mq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index a9c181603cbd..b1eeba38bc79 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -258,7 +258,8 @@ void blk_mq_unquiesce_queue(struct request_queue *q)
> blk_queue_flag_clear(QUEUE_FLAG_QUIESCED, q);
>
> /* dispatch requests which are inserted during quiescing */
> - blk_mq_run_hw_queues(q, true);
> + if (!blk_queue_dying(q) && !blk_queue_dead(q))
> + blk_mq_run_hw_queues(q, true);
> }
> EXPORT_SYMBOL_GPL(blk_mq_unquiesce_queue);
We actually still have to unquieces the queue to flush entered requests to
a failed completion after killing that queue, like in nvme_set_queue_dying().
next prev parent reply other threads:[~2019-03-27 0:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 12:07 [PATCH] block: don't call blk_mq_run_hw_queues() for dead or dying queues Hannes Reinecke
2019-03-26 13:43 ` Bart Van Assche
2019-03-26 14:08 ` Hannes Reinecke
2019-03-26 15:12 ` Bart Van Assche
2019-03-26 15:33 ` Hannes Reinecke
2019-03-26 17:49 ` James Smart
2019-03-26 17:59 ` Hannes Reinecke
2019-03-27 0:05 ` Keith Busch [this message]
2019-03-27 1:25 ` 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=20190327000500.GD4328@localhost.localdomain \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=tom.leiming@gmail.com \
/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