From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH for-6.1 0/2] iopoll bio pcpu cache fix
Date: Fri, 28 Oct 2022 01:13:10 +0100 [thread overview]
Message-ID: <6d882bc4-3c9d-ee4b-8a98-3ef61ed3201f@gmail.com> (raw)
In-Reply-To: <13b597a1-b955-ba52-aa1b-174d789a5d7b@kernel.dk>
On 10/28/22 00:55, Jens Axboe wrote:
> On 10/27/22 5:27 PM, Jens Axboe wrote:
>> On 10/27/22 4:14 PM, Pavel Begunkov wrote:
>>> There are ways to deprive bioset mempool of requests using pcpu caches
>>> and never return them back, which breaks forward progress guarantees bioset
>>> tried to provide. Fix it.
>>>
>>> Pavel Begunkov (2):
>>> mempool: introduce mempool_is_saturated
>>> bio: don't rob bios from starving bioset
>>>
>>> block/bio.c | 2 ++
>>> include/linux/mempool.h | 5 +++++
>>> 2 files changed, 7 insertions(+)
>>>
>>
>> This isn't really a concern for 6.1 and earlier, because the caching is
>> just for polled IO. Polled IO will not be grabbing any of the reserved
>> inflight units on the mempool side, which is what guarantees the forward
>> progress.
And after looking it up, apparently it can allocate from reserves.
>> It'll be a concern for the 6.2 irq based general caching, so it would
>> need to be handled there. So perhaps this can be a pre-series for a
>> reposting of that patchset.
>
> Just a followup, since we had some out-of-band discussion. This is
> a potential concern on the bio side, though not on the request side.
> But this approach is racy, we'll figure something else out.
I agree that it _may_ be, but I can't think of an counter example
for arches w/ strong ordering and would need to think more if there
is an issue in the looser ephemeral world.
--
Pavel Begunkov
next prev parent reply other threads:[~2022-10-28 0:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 22:14 [PATCH for-6.1 0/2] iopoll bio pcpu cache fix Pavel Begunkov
2022-10-27 22:14 ` [PATCH for-6.1 1/2] mempool: introduce mempool_is_saturated Pavel Begunkov
2022-10-27 22:14 ` [PATCH for-6.1 2/2] bio: don't rob bios from starving bioset Pavel Begunkov
2022-10-27 23:27 ` [PATCH for-6.1 0/2] iopoll bio pcpu cache fix Jens Axboe
2022-10-27 23:55 ` Jens Axboe
2022-10-28 0:13 ` Pavel Begunkov [this message]
2022-10-28 13:16 ` Pavel Begunkov
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=6d882bc4-3c9d-ee4b-8a98-3ef61ed3201f@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@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