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:
From this excellent primer on io_uring:
Using
IORING_SETUP_SQPOLL
will, by default, create two threads in your process, one namediou-sqp-TID
, and the other namediou-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 viaIORING_SETUP_ATTACH_WQ
together with thewq_fd
field ofio_uring_params
.
They are actually kernel tasks, not userspace threads, which is why info thread
knows nothing about them.