Open requested to merge aj46ezos/emper:io_uring_set_taskrun_flags into master
Linux 5.19 introduces new flags to control how the kernel notifies tasks running in user space about task_work to run generating completions. Prior to 5.19 the kernel would interrupt the running tasks the new introduced flags prevent the forceful interruption and set a flag in io_uring. The flag signals io_uring_peek to enter the kernel to execute the available task_work.
The man page claims that setting the flags is beneficial for most applications. Only downside I see is that io-stealing is less effective since CQEs are not immediately created.