LKML Archive on
help / color / mirror / Atom feed
From: Bart Van Assche <>
To: Jens Axboe <>
Cc: Christoph Hellwig <>, Robert Elliott <>,
	linux-kernel <>
Subject: Re: [PATCH] blk-mq: Avoid that I/O hangs in bt_get()
Date: Mon, 08 Dec 2014 15:55:14 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 11/06/14 14:41, Bart Van Assche wrote:
> With kernel 3.18-rc3 and with can_queue=62 I can trigger a hang in
> bt_get() easily.

(once more replying to my own e-mail)

Hello Jens,

Finally I found the time to look further into this. The patch below 
seems to be sufficient to prevent this hang. However, I'm not a block 
layer expert so it's not clear to me whether the patch below makes sense ?



[PATCH] blk-mq: Fix bt_get() hang

Avoid that if there are fewer hardware queues than CPU threads that
bt_get() can hang. The symptoms of the hang were as follows:
* All tags allocated for a particular hardware queue.
* (nr_tags) pending commands for that hardware queue.
* No pending commands for the software queues associated with that
   hardware queue.
  block/blk-mq-tag.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 67ab88b..e88af88 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -256,6 +256,8 @@ static int bt_get(struct blk_mq_alloc_data *data,

+		blk_mq_run_hw_queue(hctx, false);


  reply	other threads:[~2014-12-08 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 12:27 Bart Van Assche
2014-10-06 17:40 ` Jens Axboe
2014-10-06 18:53   ` Jens Axboe
2014-10-07  8:46     ` Bart Van Assche
2014-10-07 14:44       ` Jens Axboe
2014-11-06 13:41       ` Bart Van Assche
2014-12-08 14:55         ` Bart Van Assche [this message]
2014-12-08 16:49           ` Jens Axboe
2014-12-08 17:59             ` Bart Van Assche

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] blk-mq: Avoid that I/O hangs in bt_get()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).