Replies: 4 comments
-
@isilence may have more details, but I can imagine that sqe1 finishes and perhaps needs task_work to post the CQE, and depending on ring settings, that may not happen until sqe2 starts and immediately completes and posts a CQE. So I don't think we have strong ordering guarantees for the CQEs, even if we do maintain linked guarantees. |
Beta Was this translation helpful? Give feedback.
-
CQEs of the same link has always been ordered. The only exception is |
Beta Was this translation helpful? Give feedback.
-
Oh, really? So, for example, if I wanted to link a socket creation request with a connect request, I'll always see the socket CQE before the connect CQE? I think I can easily work around the LINK_TIMEOUT CQE issue by just issuing |
Beta Was this translation helpful? Give feedback.
-
Right
I think so. Note: |
Beta Was this translation helpful? Give feedback.
-
I have just a quick question.
Let's say that I have 3 linked SQEs (
sqe1
,sqe2
,sqe3
). Are there any guarantees provided by io_uring about the order of CQEs that I'll see?For example, if I call
io_uring_wait_cqe()
in a loop, am I guaranteed to see the correspondingcqe1
beforecqe2
andcqe2
beforecqe3
?I'm working on an idea that should work in theory but only if there's some ordering guarantee to how CQEs are appended to the completion queue.
I tried looking this up but didn't find anything.
Beta Was this translation helpful? Give feedback.
All reactions