io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>,
	Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Cc: io-uring <io-uring@vger.kernel.org>
Subject: Re: [PATCH 1/1] io_uring: use proper references for fallback_req locking
Date: Mon, 4 May 2020 19:28:06 +0300	[thread overview]
Message-ID: <f1c46f3c-2fc3-ecd4-d7c6-70fc19437f0e@gmail.com> (raw)
In-Reply-To: <84554b60-2ec5-9876-79ce-5962ae5580e4@kernel.dk>

On 04/05/2020 19:12, Jens Axboe wrote:
> On 5/3/20 6:52 AM, Pavel Begunkov wrote:
>> On 30/04/2020 17:52, Jens Axboe wrote:
>>> On 4/29/20 6:47 PM, Bijan Mottahedeh wrote:
>>>> Use ctx->fallback_req address for test_and_set_bit_lock() and
>>>> clear_bit_unlock().
>>>
>>> Thanks, applied.
>>>
>>
>> How about getting rid of it? As once was fairly noticed, we're screwed in many
>> other ways in case of OOM. Otherwise we at least need to make async context
>> allocation more resilient.
> 
> Not sure how best to handle it, it really sucks to have things fall apart
> under high memory pressure, a condition that isn't that rare in production
> systems. But as you say, it's only a half measure currently. We could have
> the fallback request have req->io already allocated, though. That would
> provide what we need for guaranteed forward progress, even in the presence
> of OOM conditions.

Good idea. +extend it to work with links as a next step. E.g. for short links
(2-3 reqs).

-- 
Pavel Begunkov

  reply	other threads:[~2020-05-04 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1588207670-65832-1-git-send-email-bijan.mottahedeh@oracle.com>
     [not found] ` <05997981-047c-a87b-c875-6ea7b229f586@kernel.dk>
2020-05-03 12:52   ` [PATCH 1/1] io_uring: use proper references for fallback_req locking Pavel Begunkov
2020-05-04 16:12     ` Jens Axboe
2020-05-04 16:28       ` Pavel Begunkov [this message]
2020-05-04 19:16       ` Bijan Mottahedeh

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=f1c46f3c-2fc3-ecd4-d7c6-70fc19437f0e@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bijan.mottahedeh@oracle.com \
    --cc=io-uring@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).