All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: "open list:IO_URING" <io-uring@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 7/8] io_uring: arm poll for non-nowait files
Date: Sun, 17 Oct 2021 00:16:57 +0100	[thread overview]
Message-ID: <dcc08d20-fd0c-e4d2-6500-2139aca4903e@gmail.com> (raw)
In-Reply-To: <CAFUsyfLH46EOJHvGJRToE0GApdjdX4UhO7DgnV9S4di4O1CCMQ@mail.gmail.com>

On 10/16/21 23:57, Noah Goldstein wrote:
> On Sat, Oct 16, 2021 at 5:19 PM Pavel Begunkov <asml.silence@gmail.com> wrote:
>> @@ -3238,7 +3220,8 @@ static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter)
>>           */
>>          if (kiocb->ki_flags & IOCB_HIPRI)
>>                  return -EOPNOTSUPP;
>> -       if (kiocb->ki_flags & IOCB_NOWAIT)
>> +       if ((kiocb->ki_flags & IOCB_NOWAIT) &&
>> +           !(kiocb->ki_filp->f_flags & O_NONBLOCK))
>>                  return -EAGAIN;
> 
> Instead of 2x branches on what appears to be the error (not hot path)

The whole loop_rw_iter() is a slow path, we don't care enough

-- 
Pavel Begunkov

  reply	other threads:[~2021-10-16 23:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 16:09 [PATCH for-next 0/8] further rw cleanups+optimisisation Pavel Begunkov
2021-10-15 16:09 ` [PATCH 1/8] io_uring: optimise req->ctx reloads Pavel Begunkov
2021-10-15 16:09 ` [PATCH 2/8] io_uring: kill io_wq_current_is_worker() in iopoll Pavel Begunkov
2021-10-15 16:09 ` [PATCH 3/8] io_uring: optimise io_import_iovec fixed path Pavel Begunkov
2021-10-15 16:09 ` [PATCH 4/8] io_uring: return iovec from __io_import_iovec Pavel Begunkov
2021-10-15 16:09 ` [PATCH 5/8] io_uring: optimise fixed rw rsrc node setting Pavel Begunkov
2021-10-15 16:09 ` [PATCH 6/8] io_uring: clean io_prep_rw() Pavel Begunkov
2021-10-15 16:09 ` [PATCH 7/8] io_uring: arm poll for non-nowait files Pavel Begunkov
2021-10-16 22:57   ` Noah Goldstein
2021-10-16 23:16     ` Pavel Begunkov [this message]
2021-10-15 16:09 ` [PATCH 8/8] io_uring: simplify io_file_supports_nowait() Pavel Begunkov
2021-10-16  3:36 ` [PATCH for-next 0/8] further rw cleanups+optimisisation Jens Axboe

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=dcc08d20-fd0c-e4d2-6500-2139aca4903e@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=goldstein.w.n@gmail.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.