From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 2/4] io_uring: get rid of raw fill_cqe in io_fail_links
Date: Fri, 18 Mar 2022 13:52:21 +0000 [thread overview]
Message-ID: <37cd4691cf4fd7388f26c6be57fa588966f46371.1647610155.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Replace fill_cqe insside of io_fail_links with tw. The CQE ordering
guarantees rely on the fact that io_uring's tw's are executed in order.
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 0e04e0997d7d..fff66f4d00c4 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2335,11 +2335,13 @@ static void io_fail_links(struct io_kiocb *req)
trace_io_uring_fail_link(req->ctx, req, req->user_data,
req->opcode, link);
- if (!ignore_cqes) {
+ if (!ignore_cqes)
link->flags &= ~REQ_F_CQE_SKIP;
- io_fill_cqe_req(link, res, 0);
- }
- io_put_req_deferred(link);
+ /*
+ * linked CQEs should be ordered, we rely on the tw
+ * infrastructure executing them in the right order
+ */
+ io_req_tw_queue_complete(link, res);
link = nxt;
}
}
--
2.35.1
next prev parent reply other threads:[~2022-03-18 13:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 13:52 [RFC 0/4] completion locking optimisation feature Pavel Begunkov
2022-03-18 13:52 ` [PATCH 1/4] io_uring: get rid of raw fill cqe in kill_timeout Pavel Begunkov
2022-03-18 13:52 ` Pavel Begunkov [this message]
2022-03-18 13:52 ` [PATCH 3/4] io_uring: remove raw fill_cqe from linked timeout Pavel Begunkov
2022-03-18 13:52 ` [PATCH 4/4] io_uring: optimise compl locking for non-shared rings Pavel Begunkov
2022-03-18 14:54 ` Jens Axboe
2022-03-18 15:13 ` Pavel Begunkov
2022-03-18 15:21 ` Jens Axboe
2022-03-18 15:32 ` Pavel Begunkov
2022-03-18 16:06 ` Jens Axboe
2022-03-18 14:42 ` [RFC 0/4] completion locking optimisation feature Pavel Begunkov
2022-03-18 14:52 ` Jens Axboe
2022-03-18 15:00 ` Pavel Begunkov
2022-03-18 15:22 ` Jens Axboe
2022-03-18 15:34 ` 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=37cd4691cf4fd7388f26c6be57fa588966f46371.1647610155.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