Replies: 1 comment
-
You can have one thread submitting and one completing on a single ring, so what you describe with thread A and B queueing and thread B reaping from both will work just fine. Your fixed buffer issue sounds like a misuse of the API, but hard to comment on it not having seen your source code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm attempting to use liburing to replace my AIO interface.
I have a common Q (thread safe) that stores the I/O requests X and Y in my AIO settings. I/O requests are prepared and sent by threads A and B. To obtain the X and Y, only Thread B call io_get_events().
common Q (thread safe)
Thread A → iocb(X) → io_submit → KQ
Thread B → iocb(Y) → io_submit → KQ
Thread B io_poll_get_events KQ () → X and Y are done.
Thread B
In io_uring design, Rings A and B are independently created by threads A and B. I/O requests X and Y are submitted by threads A and B, respectively. Will thread B be able to get the request X made by thread A if X is finished and thread B is currently active using io_uring_wait_cqes()?
IO Request X, Y, Z
Thread A → Ring(X), SQ(X), CQ(X) → iouring_submit(Ring(X)) → Thread A is free
Thread B → Ring(Y), SQ(Y), CQ(Y) → iouring_submit(Ring(Y)) → Thread B is free
When utilizing io_uring_prep_read_fixed and io_uring_prep_write_fixed() operations, I receive the following message: buffers: No such device or address Error unregistering buffers” . Some buffers are successfully registered but some are not. Is it due to the aforementioned cause? Or was there anything else I missed? I submit one request each time.
Beta Was this translation helpful? Give feedback.
All reactions