io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
	io-uring@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH v2 1/3] io_uring: allocate io_kiocb upfront
Date: Wed, 6 Nov 2019 15:18:18 -0700	[thread overview]
Message-ID: <49a76924-c788-1305-6aad-36018315e30e@kernel.dk> (raw)
In-Reply-To: <3ba4d378-db8c-27ac-e7a1-ac13f361bd91@gmail.com>

On 11/6/19 3:05 PM, Pavel Begunkov wrote:
> This one changes behaviour a bit. If we haven't been able to allocate
> req before, it would post an completion event with -EAGAIN. Now it will
> break imidiately without consuming sqe. So the user will see, that 0
> sqes was submitted/consumed.
> 
> Is that ok or we need to do something about it?

At the very least we need to return -EAGAIN to the application. So
something ala:

return submitted ? submitted : ret;

where ret is 0 or -EAGAIN if we failed to get a request.

-- 
Jens Axboe


  reply	other threads:[~2019-11-06 22:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 22:00 [PATCH v2 0/3] Inline sqe_submit Pavel Begunkov
2019-11-06 22:00 ` [PATCH v2 1/3] io_uring: allocate io_kiocb upfront Pavel Begunkov
2019-11-06 22:05   ` Pavel Begunkov
2019-11-06 22:18     ` Jens Axboe [this message]
2019-11-06 22:40       ` Pavel Begunkov
2019-11-06 22:00 ` [PATCH v2 2/3] io_uring: Use submit info inlined into req Pavel Begunkov
2019-11-06 22:00 ` [PATCH v2 3/3] io_uring: use inlined struct sqe_submit Pavel Begunkov
2019-11-06 22:10 ` [PATCH v2 0/3] Inline sqe_submit 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=49a76924-c788-1305-6aad-36018315e30e@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).