From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"dm-devel@redhat.com" <dm-devel@redhat.com>,
"snitzer@redhat.com" <snitzer@redhat.com>
Subject: Re: dm rq: Avoid that request processing stalls sporadically
Date: Fri, 19 Jan 2018 08:26:17 +0800 [thread overview]
Message-ID: <20180119002616.GC4712@ming.t460p> (raw)
In-Reply-To: <1516295632.2676.16.camel@wdc.com>
On Thu, Jan 18, 2018 at 05:13:53PM +0000, Bart Van Assche wrote:
> On Thu, 2018-01-18 at 11:50 -0500, Mike Snitzer wrote:
> > The issue you say it was originally intended to fix _should_ be
> > addressed with this change:
> > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.16&id=4dd6edd23e7ea971efddc303f9e67eb79e95808e
>
> Hello Mike,
>
> Sorry but I'm not convinced that that patch is sufficient. That patch helps
> if .end_io() is called with status BLK_STS_RESOURCE and also if
> blk_insert_cloned_request() returns the .queue_rq() return value. It does not
> help if .queue_rq() returns BLK_STS_RESOURCE and that return value gets
> ignored.
The return value from .queue_rq() is handled by blk-mq, why do you think
it can be ignored? Please see blk_mq_dispatch_rq_list().
> I think that can happen as follows:
> - Request cloning in multipath_clone_and_map() succeeds and that function
> returns DM_MAPIO_REMAPPED.
> - dm_dispatch_clone_request() calls blk_insert_cloned_request().
> - blk_insert_cloned_request() calls blk_mq_request_direct_issue(), which
> results in a call of __blk_mq_try_issue_directly().
> - __blk_mq_try_issue_directly() calls blk_mq_sched_insert_request(). In this
This only happens iff queue is stopped or quiesced, then we return
BLK_STS_OK to blk-mq via .queue_rq(), please see __blk_mq_try_issue_directly(),
how does this cause IO hang?
> case the BLK_STS_RESOURCE returned by the .queue_rq() implementation of the
> underlying path will be ignored.
No, this case won't return BLK_STS_RESOURCE.
--
Ming
next prev parent reply other threads:[~2018-01-19 0:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 16:37 [PATCH] dm rq: Avoid that request processing stalls sporadically Bart Van Assche
2018-01-18 16:50 ` Mike Snitzer
2018-01-18 17:13 ` Bart Van Assche
2018-01-19 0:26 ` Ming Lei [this message]
2018-01-19 0:33 ` Bart Van Assche
2018-01-19 0:11 ` [PATCH] " Ming Lei
2018-01-19 0:14 ` Bart Van Assche
2018-01-19 0:18 ` Ming Lei
2018-01-19 0:21 ` Bart Van Assche
2018-01-19 0:24 ` Jens Axboe
2018-01-19 0:35 ` Ming Lei
2018-01-19 0:49 ` Jens Axboe
2018-01-19 6:36 ` 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=20180119002616.GC4712@ming.t460p \
--to=ming.lei@redhat.com \
--cc=Bart.VanAssche@wdc.com \
--cc=dm-devel@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=snitzer@redhat.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).