public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Tim Walker <tim.t.walker@seagate.com>
Cc: Jens Axboe <axboe@kernel.dk>, Yi Zhang <yi.zhang@redhat.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] blk-mq: don't insert FUA request with data into scheduler queue
Date: Sat, 20 Nov 2021 11:58:57 +0800	[thread overview]
Message-ID: <YZhygSJylK4WeRNq@T590> (raw)
In-Reply-To: <3DEFF083-6C67-4864-81A5-454A7DAC16C0@seagate.com>

On Fri, Nov 19, 2021 at 04:49:34PM +0000, Tim Walker wrote:
> 
> 
> On  19 Nov 2021 Tim Walker wrote:
> 
> >
> >
> >On Thu, 18 Nov 2021 23:30:41 +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.
> >>
> >> [...]
> >
> >Applied, thanks!
> >
> >[1/1] blk-mq: don't insert FUA request with data into scheduler queue
> >      commit: 2b504bd4841bccbf3eb83c1fec229b65956ad8ad
> >
> >Best regards,
> >--
> >Jens Axboe
> >
> >
> >
> 
> I know the discussion is over, >

This thread is just for fixing one recent regression caused by queuing
FUA data into scheduler queue, and actually direct dispach has
been done for very long time, but I don't mean it is reasonable.

> but I can't figure out why we treat FUA as a flush. A FUA write only
> applies to the command at hand, and is not required to flush any previous
> command's data from the device's volatile write cache. Similarly for a
> read request - servicing a read from media is really more the rule than
> the exception (lots of workload dependencies here...), so why would a
> FUA read bypass the scheduler?

Is there linux kernel FUA read users? Just run a quick grep, seems FUA
is just used for sync write.

> The device is always free to service any request from media or cache (
> as long as it follows the applicable volatile write and read cache settings),
> so normally we don't know how it is treating the request, so it doesn't seem
> to matter. 
> 
> Consider a FUA write: Why does the fact that we intend that write to bypass
> the device volatile write cache mean it should bypass the scheduler? All the
> other traffic-shaping algorithms that help effectively schedule writes are
> still applicable. E.g. we know we can delay/coalesce them a bit to allow
> reads to be prioritized, but I can't figure out why we would fast-track a
> FUA write. Isn't the value to the system for scheduling still valid, even
> though we are forcing the data to go to media?

It shouldn't be hard to to queue FUA into scheduler, but details need to
consider, such as, if FUA can be merged with normal IO, maybe others.

Also do you have any test or benchmark result to support the change of
queuing FUA to scheduler?


Thanks,
Ming


  parent reply	other threads:[~2021-11-20  3:59 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
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 [this message]
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=YZhygSJylK4WeRNq@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=tim.t.walker@seagate.com \
    --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