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
Uh oh!
There was an error while loading. Please reload this page.
-
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_recvandio_uring_prep_send. I was surprised to discover that when running it spawns a number ofiou-wrkthreads, 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_addthat thenIOSQE_IO_LINKs to therecv/send. After making this change, it appears that my echo server no longer spawnsiou-wrkthreads.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