From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "hch@lst.de" <hch@lst.de>, "hare@suse.de" <hare@suse.de>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"osandov@fb.com" <osandov@fb.com>,
"jthumshirn@suse.de" <jthumshirn@suse.de>,
"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH 4/7] blk-mq: Avoid that request processing stalls when sharing tags
Date: Sat, 2 Dec 2017 08:36:30 +0800 [thread overview]
Message-ID: <20171202003625.GA24521@ming.t460p> (raw)
In-Reply-To: <1512157932.2520.27.camel@wdc.com>
On Fri, Dec 01, 2017 at 07:52:14PM +0000, Bart Van Assche wrote:
> On Fri, 2017-12-01 at 10:58 +0800, Ming Lei wrote:
> > On Thu, Nov 30, 2017 at 04:08:45PM -0800, Bart Van Assche wrote:
> > > blk_mq_sched_mark_restart_hctx() must be called before
> >
> > Could you please describe the theory on commit log? Like, why is it
> > a must? and what is the issue to be fixed?
>
> The BLK_MQ_S_SCHED_RESTART test at the end of blk_mq_dispatch_rq_list() can
> only work if BLK_MQ_S_SCHED_RESTART is set before blk_mq_dispatch_rq_list()
> is called.
The theory about using BLK_MQ_S_SCHED_RESTART in current way is that we
mark it after requests are added to hctx->dispatch, then blk_mq_sched_restart()
can see this request to be revisited.
So in theory, we don't need to set it before each dispatch.
Once .get_budget()/.put_budget() is introduced, things may be a bit
different because we may need to revisit requests in scheduler/SW queue.
But we depend on SCSI's RESTART(scsi_end_request()) to do that. So we
still don't need this patch.
> BTW, without this patch every iteration of my test triggers a
> queue stall. With this patch a queue stall only occurs sporadically so I
> think we really need something like this patch.
We need to root cause your queue stall first, otherwise any change can
be thought as workaround. Could you investigate the issue a bit and get
the exact reason?
>
> > > blk_mq_dispatch_rq_list() is called. Make sure that
> > > BLK_MQ_S_SCHED_RESTART is set before any blk_mq_dispatch_rq_list()
> > > call occurs.
> > >
> > > Fixes: commit b347689ffbca ("blk-mq-sched: improve dispatching from sw queue")
> >
> > We always mark RESTART state bit just before dispatching from ->dispatch_list,
> > this way has been there before b347689ffbca, which doesn't change this
> > RESTART mechanism, so please explain a bit why it is a fix on commit
> > b347689ffbca.
>
> I'm not completely sure which patch introduced the lockup fixed by this patch
> but I will have another look whether this was really introduced by commit
> b347689ffbca.
Please make sure 'Fixes' tag correct.
--
Ming
next prev parent reply other threads:[~2017-12-02 0:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 0:08 [PATCH 0/7] blk-mq: Queue running fixes Bart Van Assche
2017-12-01 0:08 ` [PATCH 1/7] blk-mq: Fix spelling in a source code comment Bart Van Assche
2017-12-01 0:08 ` [PATCH 2/7] block: Document more locking requirements Bart Van Assche
2017-12-01 3:03 ` Jens Axboe
2017-12-01 17:05 ` Bart Van Assche
2017-12-01 0:08 ` [PATCH 3/7] blk-mq: Make blk_mq_mark_tag_wait() easier to read Bart Van Assche
2017-12-01 0:08 ` [PATCH 4/7] blk-mq: Avoid that request processing stalls when sharing tags Bart Van Assche
2017-12-01 2:58 ` Ming Lei
2017-12-01 19:52 ` Bart Van Assche
2017-12-02 0:36 ` Ming Lei [this message]
2017-12-02 0:48 ` Bart Van Assche
2017-12-02 1:00 ` Ming Lei
2017-12-02 1:05 ` Bart Van Assche
2017-12-02 1:14 ` Ming Lei
2017-12-02 1:20 ` Ming Lei
2017-12-01 0:08 ` [PATCH 5/7] blk-mq: Avoid that blk_mq_mark_tag_wait() triggers a queue stall Bart Van Assche
2017-12-01 3:51 ` Ming Lei
2017-12-01 0:08 ` [PATCH 6/7] blk-mq: Rerun hardware queues after having called .put_budget() Bart Van Assche
2017-12-01 3:23 ` Ming Lei
2017-12-01 0:08 ` [PATCH 7/7] blk-mq: Fix another queue stall Bart Van Assche
2017-12-01 3:00 ` Jens Axboe
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=20171202003625.GA24521@ming.t460p \
--to=ming.lei@redhat.com \
--cc=Bart.VanAssche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=osandov@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.