Skip to content

understand better IORING_SETUP_COOP_TASKRUN and IORING_SETUP_TASKRUN_FLAG #617

Answered by axboe
romange asked this question in Q&A
Discussion options

You must be logged in to vote

Specifically, is it relevant if a single thread operates on io_uring without SQ_POLL mode enabled?

Yes

Should we always set both flags to gain performance benefits? Are there any tradeoffs?

Only set TASKRUN_FLAG is you rely on io_uring_cqe_peek() operations to be reliable. This is documented in the man page too.

Can I assume that kernels before 5.19 will just silently ignore those flags?

No, as with any operation, if you pass in flags the kernel doesn't know about, it'll fail with -EINVAL.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by romange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants