c++linuxubuntulibuvio-uring

How to identify if a thread is related to io_uring in Ubuntu?


I'm running Ubuntu and executed the command top -H -p 486944 to show my application threads, which shows a thread named iou-sqp-486944. This thread is not one that I created, and it doesn't appear in the output of info threads when using GDB to inspect the process. Based on the thread's name, I suspect it could be related to io_uring, but I am unsure.

How can I confirm that this thread is indeed associated with io_uring? Are there any specific tools or commands I can use to verify the origin and purpose of this thread?

here are the screen shots:

enter image description here

enter image description here


Solution

  • From this excellent primer on io_uring:

    Using IORING_SETUP_SQPOLL will, by default, create two threads in your process, one named iou-sqp-TID, and the other named iou-wrk-TID.

    The former is created the first time work is submitted. The latter is created whenever the uring is enabled (i.e. at creation time, unless IORING_SETUP_R_DISABLED is used). Submission queue poll threads can be shared between urings via IORING_SETUP_ATTACH_WQ together with the wq_fd field of io_uring_params.

    They are actually kernel tasks, not userspace threads, which is why info thread knows nothing about them.