public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Yufen Yu <yuyufen@huawei.com>
Cc: linux-block@vger.kernel.org, tj@kernel.org, hch@lst.de
Subject: Re: [RFC PATCH] block: defer flush request no matter whether we have elevator
Date: Fri, 17 Jul 2020 07:14:40 -0600	[thread overview]
Message-ID: <115a73e6-371f-5d21-4739-cb38ffed7b8a@kernel.dk> (raw)
In-Reply-To: <20200716065201.3213045-1-yuyufen@huawei.com>

On 7/16/20 12:52 AM, Yufen Yu wrote:
> Commit 7520872c0cf4 ("block: don't defer flushes on blk-mq + scheduling")
> tried to fix deadlock for cycled wait between flush requests and data
> request into flush_data_in_flight. The former holded all driver tags
> and wait for data request completion, but the latter can not complete
> for waiting free driver tags.
> 
> After commit 923218f6166a ("blk-mq: don't allocate driver tag upfront
> for flush rq"), flush requests will not get driver tag before queuing
> into flush queue.
> 
> * With elevator, flush request just get sched_tags before inserting
>   flush queue. It will not get driver tag until issue them to driver.
>   data request on list fq->flush_data_in_flight will complete in
>   the end.
> 
> * Without elevator, each flush request will get a driver tag when
>   allocate request. Then data request on fq->flush_data_in_flight
>   don't worry about lacking driver tag.
> 
> In both of these cases, cycled wait cannot be true. So we may allow
> to defer flush request.

Applied, thanks.

-- 
Jens Axboe


      parent reply	other threads:[~2020-07-17 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16  6:52 [RFC PATCH] block: defer flush request no matter whether we have elevator Yufen Yu
2020-07-17  8:06 ` Ming Lei
2020-07-17 13:14 ` Jens Axboe [this message]

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=115a73e6-371f-5d21-4739-cb38ffed7b8a@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=yuyufen@huawei.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