From: Jens Axboe <axboe@kernel.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: linux-block@vger.kernel.org, mikelley@microsoft.com,
stable@vger.kernel.org
Subject: Re: [PATCH 2/2] block: don't allow splitting of a REQ_NOWAIT bio
Date: Wed, 4 Jan 2023 13:24:24 -0700 [thread overview]
Message-ID: <e2fbce81-3b2c-72ff-c7e5-07d2e7e69bc6@kernel.dk> (raw)
In-Reply-To: <Y7XP5w9cTyHJHwta@kbusch-mbp.dhcp.thefacebook.com>
On 1/4/23 12:13?PM, Keith Busch wrote:
> On Wed, Jan 04, 2023 at 09:09:38AM -0700, Jens Axboe wrote:
>> If we split a bio marked with REQ_NOWAIT, then we can trigger spurious
>> EAGAIN if constituent parts of that split bio end up failing request
>> allocations. Parts will complete just fine, but just a single failure
>> in one of the chained bios will yield an EAGAIN final result for the
>> parent bio.
>>
>> Return EAGAIN early if we end up needing to split such a bio, which
>> allows for saner recovery handling.
>
> We're losing some performance here for large-ish single depth IO with
> nvme. We can get a little back by forcing to use the async worker
> earlier in the dispatch instead of getting all the way to the bio
> splitting, but the overhead to check for the condition (which is
> arbitrary decision anyway since we don't know the queue limits at
> io_uring prep time) mostly negates the gain.
Yes, it's not perfect - for perfection, we'd need to be able to either
arbitrarily retry parts of the split bio if we can't get a tag. Or
reserve tags for this request when doing the splits. Either one of those
would require extensive surgery to achieve. In my testing, the cost is
low enough that I think we can live with this for now.
> It's probably fine, though, since you can still hit peak b/w with just a
> little higher qdepth. This patch is a simple way to handle the problem,
> so looks good to me.
>
> Reviewed-by: Keith Busch <kbusch@kernel.org>
Thanks!
--
Jens Axboe
next prev parent reply other threads:[~2023-01-04 20:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 16:09 [PATCH 0/2] Don't allow REQ_NOWAIT for bio splitting Jens Axboe
2023-01-04 16:09 ` [PATCH 1/2] block: handle bio_split_to_limits() NULL return Jens Axboe
2023-01-10 9:20 ` Christoph Hellwig
2023-01-17 6:01 ` Christoph Hellwig
2023-01-18 2:22 ` Jens Axboe
2023-01-04 16:09 ` [PATCH 2/2] block: don't allow splitting of a REQ_NOWAIT bio Jens Axboe
2023-01-04 19:13 ` Keith Busch
2023-01-04 20:24 ` Jens Axboe [this message]
2023-01-10 9:21 ` Christoph Hellwig
2023-01-17 6:01 ` Christoph Hellwig
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=e2fbce81-3b2c-72ff-c7e5-07d2e7e69bc6@kernel.dk \
--to=axboe@kernel.dk \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=stable@vger.kernel.org \
/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).