public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH RFC] io_uring: remove retries from io_wq_submit_work()
Date: Mon, 24 Feb 2020 12:15:11 +0300	[thread overview]
Message-ID: <843cc96a407b2cbfe869d9665c8120bdde34683e.1582535688.git.asml.silence@gmail.com> (raw)

It seems no opcode may return -EAGAIN for non-blocking case and expect
to be reissued. Remove retry code from io_wq_submit_work().

Signed-off-by: Pavel Begunkov <[email protected]>
---
 fs/io_uring.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index b9dd94143c30..b2ce8a3d3dd1 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4622,26 +4622,14 @@ static void io_wq_submit_work(struct io_wq_work **workptr)
 	struct io_wq_work *work = *workptr;
 	struct io_kiocb *req = container_of(work, struct io_kiocb, work);
 	struct io_kiocb *nxt = NULL;
-	int ret = 0;
+	int ret;
 
 	/* if NO_CANCEL is set, we must still run the work */
 	if ((work->flags & (IO_WQ_WORK_CANCEL|IO_WQ_WORK_NO_CANCEL)) ==
 				IO_WQ_WORK_CANCEL) {
 		ret = -ECANCELED;
-	}
-
-	if (!ret) {
-		do {
-			ret = io_issue_sqe(req, NULL, &nxt, false);
-			/*
-			 * We can get EAGAIN for polled IO even though we're
-			 * forcing a sync submission from here, since we can't
-			 * wait for request slots on the block side.
-			 */
-			if (ret != -EAGAIN)
-				break;
-			cond_resched();
-		} while (1);
+	} else {
+		ret = io_issue_sqe(req, NULL, &nxt, false);
 	}
 
 	/* drop submission reference */
-- 
2.24.0


             reply	other threads:[~2020-02-24  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24  9:15 Pavel Begunkov [this message]
2020-02-24 15:27 ` [PATCH RFC] io_uring: remove retries from io_wq_submit_work() Jens Axboe
2020-02-24 15:40   ` Pavel Begunkov
2020-02-24 18:16     ` Jens Axboe
2020-02-24 18:33       ` Pavel Begunkov
2020-02-24 18:37         ` 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=843cc96a407b2cbfe869d9665c8120bdde34683e.1582535688.git.asml.silence@gmail.com \
    [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