From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"longli@exchange.microsoft.com" <longli@exchange.microsoft.com>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "sthemmin@microsoft.com" <sthemmin@microsoft.com>,
"kys@microsoft.com" <kys@microsoft.com>,
"longli@microsoft.com" <longli@microsoft.com>
Subject: Re: [PATCH] block-mq: set both block queue and hardware queue restart bit for restart
Date: Thu, 6 Apr 2017 00:32:16 +0000 [thread overview]
Message-ID: <1491438735.2787.18.camel@sandisk.com> (raw)
In-Reply-To: <1491437781-3565-1-git-send-email-longli@exchange.microsoft.com>
On Wed, 2017-04-05 at 17:16 -0700, Long Li wrote:
> Under heavy I/O, one hardware queue may be unable to dispatch any I/O to the
> device layer. This poses a problem with restarting this hardware queue on I/O
> finish in blk_mq_sched_restart_queues(), becaue there is nothing pending that
> will finish in future on this hardware qeueu. This will result in deadlock.
>
> With this patch, we check for all possible stalled hardware queues when I/O
> finishes on any hardware queues. This prevents this deadlock.
>
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
> block/blk-mq-sched.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
> index 09af8ff..f7f3d44 100644
> --- a/block/blk-mq-sched.c
> +++ b/block/blk-mq-sched.c
> @@ -202,7 +202,7 @@ void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
> * needing a restart in that case.
> */
> if (!list_empty(&rq_list)) {
> - blk_mq_sched_mark_restart_hctx(hctx);
> + blk_mq_sched_mark_restart_queue(hctx);
> did_work = blk_mq_dispatch_rq_list(hctx, &rq_list);
> } else if (!has_sched_dispatch) {
> blk_mq_flush_busy_ctxs(hctx, &rq_list);
Please drop this patch. I'm working on a better solution.
Thanks,
Bart.
next prev parent reply other threads:[~2017-04-06 0:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 0:16 [PATCH] block-mq: set both block queue and hardware queue restart bit for restart Long Li
2017-04-06 0:32 ` Bart Van Assche [this message]
2017-04-06 3:38 ` Long Li
2017-04-06 3:45 ` Bart Van Assche
2017-04-06 4:21 ` KY Srinivasan
2017-04-06 5:38 ` Long Li
2017-04-10 23:47 ` Bart Van Assche
2017-04-13 23:12 ` Long Li
2017-05-05 8:58 ` Long Li
2017-05-05 19:52 ` 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:
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=1491438735.2787.18.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=axboe@kernel.dk \
--cc=kys@microsoft.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@exchange.microsoft.com \
--cc=longli@microsoft.com \
--cc=sthemmin@microsoft.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;
as well as URLs for NNTP newsgroup(s).