From: Mike Snitzer <snitzer@redhat.com>
To: axboe@kernel.dk, Ming Lei <ming.lei@redhat.com>
Cc: Bart Van Assche <Bart.VanAssche@wdc.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"hch@infradead.org" <hch@infradead.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
"loberman@redhat.com" <loberman@redhat.com>,
"dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE
Date: Sat, 27 Jan 2018 14:09:20 -0500 [thread overview]
Message-ID: <20180127190920.GA24759@redhat.com> (raw)
In-Reply-To: <20180124033109.GA15945@ming.t460p>
On Tue, Jan 23 2018 at 10:31pm -0500,
Ming Lei <ming.lei@redhat.com> wrote:
> On Tue, Jan 23, 2018 at 04:57:34PM +0000, Bart Van Assche wrote:
> > On Wed, 2018-01-24 at 00:37 +0800, Ming Lei wrote:
> > > On Tue, Jan 23, 2018 at 04:24:20PM +0000, Bart Van Assche wrote:
> > > > My opinion about this patch is as follows:
> > > > * Changing a blk_mq_delay_run_hw_queue() call followed by return
> > > > BLK_STS_DEV_RESOURCE into return BLK_STS_RESOURCE is wrong because it changes
> > > > a guaranteed queue rerun into a queue rerun that may or may not happen
> > > > depending on whether or not multiple queue runs happen simultaneously.
> > >
> > > You may not understand the two:
> > >
> > > 1) it is always safe to return BLK_STS_RESOURCE, which will make sure to
> > > avoid IO hang by blk_mq_delay_run_hw_queue() or blk_mq_run_hw_queue(),
> > > and using which one depends on SCHED_RESTART.
> > >
> > > 2) if driver can make sure the queue will be rerun after some resource
> > > is available, either by itself or by blk-mq, it will return BLK_STS_DEV_RESOURCE
> > >
> > > So what is wrong with this way?
> >
> > Sorry, I swapped BLK_STS_DEV_RESOURCE and BLK_STS_RESOURCE accidentally in my
> > reply. What I meant is that changing a blk_mq_delay_run_hw_queue() call followed
> > by return BLK_STS_RESOURCE into BLK_STS_DEV_RESOURCE is wrong and introduces a
> > race condition in code where there was no race condition.
>
> OK, then no such race you worried about in this patch.
>
> Jens, could you take a look at this patch?
Hi Jens,
Ming let me know that he successfully tested this V3 patch using both
your test (fio to both mpath and underlying path) and Bart's (02-mq with
can_queue in guest).
Would be great if you'd review and verify this fix works for you too.
Ideally we'd get a fix for this regression staged for 4.16 inclusion.
This V3 patch seems like the best option we have at this point.
Mike
next prev parent reply other threads:[~2018-01-27 19:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 16:16 [PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE Ming Lei
2018-01-23 16:20 ` Mike Snitzer
2018-01-23 16:24 ` Bart Van Assche
2018-01-23 16:37 ` Ming Lei
2018-01-23 16:57 ` Bart Van Assche
2018-01-24 3:31 ` Ming Lei
2018-01-27 19:09 ` Mike Snitzer [this message]
2018-01-27 22:12 ` Bart Van Assche
2018-01-27 23:41 ` Ming Lei
2018-01-29 16:48 ` Bart Van Assche
2018-01-30 1:07 ` Ming Lei
2018-01-30 1:11 ` Bart Van Assche
2018-01-30 3:31 ` Ming Lei
2018-01-30 3:37 ` Bart Van Assche
2018-01-30 3:42 ` Ming Lei
2018-01-28 0:23 ` Mike Snitzer
2018-01-28 0:54 ` Bart Van Assche
2018-01-28 2:03 ` Mike Snitzer
2018-01-28 3:00 ` Bart Van Assche
2018-01-28 4:58 ` Mike Snitzer
2018-01-28 16:57 ` Bart Van Assche
2018-01-28 17:26 ` Laurence Oberman
2018-01-28 11:39 ` Ming Lei
2018-01-28 17:03 ` Bart Van Assche
2018-01-29 2:14 ` 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=20180127190920.GA24759@redhat.com \
--to=snitzer@redhat.com \
--cc=Bart.VanAssche@wdc.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@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).