From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>,
[email protected], [email protected]
Subject: [PATCH 1/4] io_uring: remove setting REQ_F_MUST_PUNT in rw
Date: Sun, 21 Jun 2020 13:09:50 +0300 [thread overview]
Message-ID: <c302765282443434e8a0dc4a83f73bf2b5c7845c.1592733956.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
io_{read,write}() {
...
copy_iov: // prep async
if (!(flags & REQ_F_NOWAIT) && !file_can_poll(file))
flags |= REQ_F_MUST_PUNT;
}
REQ_F_MUST_PUNT there is pointless, because if it happens then
REQ_F_NOWAIT is known to be _not_ set, and the request will go
async path in __io_queue_sqe() anyway. file_can_poll() check
is also repeated in arm_poll*(), so don't need it.
Remove the mentioned assignment REQ_F_MUST_PUNT in preparation
for killing the flag.
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 44614571e285..e7ce1608087f 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2915,10 +2915,6 @@ static int io_read(struct io_kiocb *req, bool force_nonblock)
inline_vecs, &iter);
if (ret)
goto out;
- /* any defer here is final, must blocking retry */
- if (!(req->flags & REQ_F_NOWAIT) &&
- !file_can_poll(req->file))
- req->flags |= REQ_F_MUST_PUNT;
/* if we can retry, do so with the callbacks armed */
if (io_rw_should_retry(req)) {
ret2 = io_iter_do_read(req, &iter);
@@ -3050,10 +3046,6 @@ static int io_write(struct io_kiocb *req, bool force_nonblock)
inline_vecs, &iter);
if (ret)
goto out_free;
- /* any defer here is final, must blocking retry */
- if (!(req->flags & REQ_F_NOWAIT) &&
- !file_can_poll(req->file))
- req->flags |= REQ_F_MUST_PUNT;
return -EAGAIN;
}
}
--
2.24.0
next prev parent reply other threads:[~2020-06-21 10:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 10:09 [PATCH 0/4] small random patches Pavel Begunkov
2020-06-21 10:09 ` Pavel Begunkov [this message]
2020-06-21 10:09 ` [PATCH 2/4] io_uring: remove REQ_F_MUST_PUNT Pavel Begunkov
2020-06-21 10:09 ` [PATCH 3/4] io_uring: set @poll->file after @poll init Pavel Begunkov
2020-06-21 10:09 ` [PATCH 4/4] io_uring: kill NULL checks for submit state Pavel Begunkov
2020-06-22 3:06 ` [PATCH 0/4] small random patches 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=c302765282443434e8a0dc4a83f73bf2b5c7845c.1592733956.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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