From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Yi Zhang <yi.zhang@redhat.com>
Subject: Re: [PATCH] blk-mq: don't insert FUA request with data into scheduler queue
Date: Fri, 19 Nov 2021 16:07:30 +0800 [thread overview]
Message-ID: <YZdbQiaQPPvbXSkR@T590> (raw)
In-Reply-To: <20211119060857.GA15001@lst.de>
On Fri, Nov 19, 2021 at 07:08:58AM +0100, Christoph Hellwig wrote:
> On Thu, Nov 18, 2021 at 11:30:41PM +0800, Ming Lei wrote:
> > We never insert flush request into scheduler queue before.
> >
> > Recently commit d92ca9d8348f ("blk-mq: don't handle non-flush requests in
> > blk_insert_flush") tries to handle FUA data request as normal request.
> > This way has caused warning[1] in mq-deadline dd_exit_sched() or io hang in
> > case of kyber since RQF_ELVPRIV isn't set for flush request, then
> > ->finish_request won't be called.
> >
> > Fix the issue by inserting FUA data request with blk_mq_request_bypass_insert()
> > when the device supports FUA, just like what we did before.
>
> How we did end up with REQ_ELV set for this request?
We set REQ_ELV for any request if q->elevator isn't NULL, see
__blk_mq_alloc_requests(), and REQ_ELV is just for replacing the check on
q->elevator. If we clear REQ_ELV for flush rq, other problem may be caused,
such as blk_mq_rq_ctx_init() may be confused.
Also flush request is always inserted to hctx->dispatch directly, either
before commit d92ca9d8348f or being queued via requeue in current code.
Thanks,
Ming
next prev parent reply other threads:[~2021-11-19 8:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 15:30 [PATCH] blk-mq: don't insert FUA request with data into scheduler queue Ming Lei
2021-11-18 18:22 ` Bart Van Assche
2021-11-19 6:08 ` Christoph Hellwig
2021-11-19 8:07 ` Ming Lei [this message]
2021-11-19 13:28 ` Jens Axboe
[not found] ` <BFC93946-13B3-43EC-9E30-8A980CD5234F@seagate.com>
2021-11-19 16:49 ` Tim Walker
2021-11-19 16:56 ` Christoph Hellwig
2021-11-19 17:49 ` Tim Walker
2021-11-20 3:58 ` Ming Lei
2021-11-23 16:11 ` Tim Walker
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=YZdbQiaQPPvbXSkR@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=yi.zhang@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