io_uring: add IORING_SETUP_TASKRUN_FLAG
authorJens Axboe <axboe@kernel.dk>
Sat, 23 Apr 2022 21:22:11 +0000 (15:22 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 Apr 2022 23:22:45 +0000 (17:22 -0600)
commit74607fe4b1247098890bd04689ad397bc249c38c
treecf8afe2c6971cb588c0663ddd1e28f0dc7dbe290
parent55c4596d05077b619ff53e3a4919c0548303c7fd
io_uring: add IORING_SETUP_TASKRUN_FLAG

If IORING_SETUP_COOP_TASKRUN is set to use cooperative scheduling for
running task_work, then IORING_SETUP_TASKRUN_FLAG can be set so the
application can tell if task_work is pending in the kernel for this
ring. This allows use cases like io_uring_peek_cqe() to still function
appropriately, or for the task to know when it would be useful to
call io_uring_wait_cqe() to run pending events.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h