All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, Hao Xu <haoxu@linux.alibaba.com>,
	io-uring@vger.kernel.org
Subject: Re: [PATCH v2 1/1] io_uring: allocate memory for overflowed CQEs
Date: Wed, 24 Feb 2021 09:39:27 +0000	[thread overview]
Message-ID: <055b8a19-c86a-88a5-79f4-21099bba6f14@gmail.com> (raw)
In-Reply-To: <fda005e8-d16d-6563-d526-440deb7737f6@kernel.dk>

On 24/02/2021 03:18, Jens Axboe wrote:
> On 2/23/21 8:06 PM, Hao Xu wrote:
>> 在 2021/2/23 下午8:40, Pavel Begunkov 写道:
>>> Instead of using a request itself for overflowed CQE stashing, allocate
>>> a separate entry. The disadvantage is that the allocation may fail and
>>> it will be accounted as lost (see rings->cq_overflow), so we lose
>>> reliability in case of memory pressure. However, it opens a way for for
>>> multiple CQEs per an SQE and even generating SQE-less CQEs >
>>> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
>>> ---
>> Hi Pavel,
>> Allow me to ask a stupid question, why do we need to support multiple 
>> CQEs per SQE or even SQE-less CQEs in the future?
> 
> Not a stupid question at all, since it's not something we've done
> before. There's been discussion about this in the past, in the presence
> of the zero copy IO where we ideally want to post two CQEs for an SQE.
> Most recently I've been playing with multishot poll support, where a
> POLL_ADD will stay active after triggering. Hence you could be posting
> many CQEs for that SQE, over the life time of the request.

Yep, in addition should be useful for eBPF requests.

-- 
Pavel Begunkov

      parent reply	other threads:[~2021-02-24  9:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 12:40 [PATCH v2 1/1] io_uring: allocate memory for overflowed CQEs Pavel Begunkov
2021-02-23 14:22 ` Jens Axboe
2021-02-23 15:36   ` Pavel Begunkov
2021-02-24  3:06 ` Hao Xu
2021-02-24  3:18   ` Jens Axboe
2021-02-24  3:47     ` Hao Xu
2021-02-24  9:39     ` Pavel Begunkov [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=055b8a19-c86a-88a5-79f4-21099bba6f14@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=haoxu@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.