-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Hi, I'm encountering an issue when initializing Photon with io_uring options enabled.
Here is the log output:
/////
2025/05/31 10:15:34.596740|INFO |th=000058114BE9E970|iouring-wrapper.cpp:702|new_iouring_event_engine:Init event engine: iouring [is_master=1][setup_sqpoll=1][setup_sq_aff=1][sq_thread_cpu=2]
2025/05/31 10:15:34.596755|DEBUG|th=000058114BE9E970|reset_handle.cpp:27|ResetHandle:push [this=000058114BE89150]
2025/05/31 10:15:34.596767|INFO |th=000058114BE9E970|iouring-wrapper.cpp:557|check_register_file_support:iouring: register_files is enabled
2025/05/31 10:15:34.596791|INFO |th=000058114BE9E970|iouring-wrapper.cpp:123|init:io_uring_queue_init failed, removing IORING_SETUP_COOP_TASKRUN
/////
My code for initializing Photon looks like this:
////
photon::PhotonOptions opts;
opts.iouring_sq_thread_cpu = 1;
opts.iouring_sq_thread_idle_ms = 10;
uint64_t event_flags = INIT_EVENT_IOURING |
INIT_EVENT_IOURING_SQPOLL |
INIT_EVENT_IOURING_SQ_AFF;
if (photon::init(event_flags, INIT_IO_NONE, opts)) {
LOG_ERROR_RETURN(0, -1, "Photon init failed");
}
DEFER(photon::fini());
////
It looks like the kernel rejects IORING_SETUP_COOP_TASKRUN, and Photon silently disables it. I'm trying to understand:
Could someone please clarify:
-
Why io_uring_queue_init fails with IORING_SETUP_COOP_TASKRUN?
-
Should I explicitly disable IORING_SETUP_COOP_TASKRUN, or is this fallback expected behavior?
-
Are there known kernel limitations or conflicts between SQPOLL/SQ_AFF and COOP_TASKRUN?
Thank you so much for your help!