Closed ZhenbangYou closed 5 months ago
No, because the SQE is only visible to the kernel thread after you do io_uring_submit(ring);
. This would be step 4.
Internally liburing does increment the tail of the ring which is polled by the kernel in submit using __io_uring_flush_sq()
I see! No wonder without io_uring_submit
my SQEs weren't executed in SQPOLL mode. Thank you so much!
This question is all about SQ polling. Say, I want to submit a
read
request, so I do the following three steps:io_uring_get_sqe
,io_uring_prep_read
,user_data
.However, since the kernel is polling, is it possible for the following two scenarios to happen:
nop
, so I will lose thisread
operation.user_data
is still not set, I won't get a CQE with expecteduser_data
in the CQ.I tried very hard to find an answer to this, but I couldn't make it. Thanks so much for answering my question!