When does io_uring create tasks or otherwise start iou-wrk threads? #842
Unanswered
armanbilge
asked this question in
Q&A
Replies: 2 comments 16 replies
-
That shouldn't happen, not often, and it should do fine if you just submit a send/recv without polling first. What is your kernel version? Is it nonblocking (SOCK_NONBLOCK, MSG_DONTWAIT)? Do you use |
Beta Was this translation helpful? Give feedback.
15 replies
-
What kernel is being used? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am seeking more detailed information about when submitted I/O operations create tasks that are executed on the io_uring worker pool. This blog post has been a good resource, but it doesn't answer all of my questions.
My motivating "case study":
In armanbilge/fs2-io_uring#56 I created a TCP echo server with
io_uring_prep_recv
andio_uring_prep_send
. I was surprised to discover that when running it spawns a number ofiou-wrk
threads, which I assumed should not be necessary for non-blocking network I/O.So in armanbilge/fs2-io_uring#61 I added a
io_uring_prep_poll_add
that thenIOSQE_IO_LINK
s to therecv
/send
. After making this change, it appears that my echo server no longer spawnsiou-wrk
threads.I'd really like to understand why that is and how I can be more conscious in the future about how to submit I/O that does not require the worker pool, if possible. For example, I am wondering if I should make a similar change for
accept
.Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions