From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 1/3] io_uring: don't miss setting IO_WQ_WORK_CONCURRENT
Date: Thu, 22 Oct 2020 16:47:16 +0100 [thread overview]
Message-ID: <30ce59cbaab4da30a7df6af0034d7b1791993058.1603381526.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Set IO_WQ_WORK_CONCURRENT for all REQ_F_FORCE_ASYNC requests, do that in
that is also looks better.
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 8e48e47906ba..9aeaa6f4a593 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1362,6 +1362,9 @@ static void io_prep_async_work(struct io_kiocb *req)
io_req_init_async(req);
id = req->work.identity;
+ if (req->flags & REQ_F_FORCE_ASYNC)
+ req->work.flags |= IO_WQ_WORK_CONCURRENT;
+
if (req->flags & REQ_F_ISREG) {
if (def->hash_reg_file || (ctx->flags & IORING_SETUP_IOPOLL))
io_wq_hash_work(&req->work, file_inode(req->file));
@@ -6265,13 +6268,6 @@ static void io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe,
if (unlikely(ret))
goto fail_req;
}
-
- /*
- * Never try inline submit of IOSQE_ASYNC is set, go straight
- * to async execution.
- */
- io_req_init_async(req);
- req->work.flags |= IO_WQ_WORK_CONCURRENT;
io_queue_async_work(req);
} else {
if (sqe) {
--
2.24.0
next prev parent reply other threads:[~2020-10-22 15:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 15:47 [PATCH 0/3] __io_queue_sqe() cleanups Pavel Begunkov
2020-10-22 15:47 ` Pavel Begunkov [this message]
2020-10-22 15:47 ` [PATCH 2/3] io_uring: simplify nxt propagation in io_queue_sqe Pavel Begunkov
2020-10-22 15:47 ` [PATCH 3/3] io_uring: simplify __io_queue_sqe() 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=30ce59cbaab4da30a7df6af0034d7b1791993058.1603381526.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