aboutsummaryrefslogtreecommitdiff
path: root/include/linux/io_uring_types.h
diff options
context:
space:
mode:
authorGravatar Dylan Yudaken <dylany@fb.com> 2022-08-30 05:50:12 -0700
committerGravatar Jens Axboe <axboe@kernel.dk> 2022-09-21 10:30:42 -0600
commit21a091b970cdbcf3e8ff829234b51be6f9192766 (patch)
tree5f1b5bb144929d86300b1ed0732c60d645be9c26 /include/linux/io_uring_types.h
parentio_uring: move io_eventfd_put (diff)
downloadlinux-21a091b970cdbcf3e8ff829234b51be6f9192766.tar.gz
linux-21a091b970cdbcf3e8ff829234b51be6f9192766.tar.bz2
linux-21a091b970cdbcf3e8ff829234b51be6f9192766.zip
io_uring: signal registered eventfd to process deferred task work
Some workloads rely on a registered eventfd (via io_uring_register_eventfd(3)) in order to wake up and process the io_uring. In the case of a ring setup with IORING_SETUP_DEFER_TASKRUN, that eventfd also needs to be signalled when there are tasks to run. This changes an old behaviour which assumed 1 eventfd signal implied at least 1 CQE, however only when this new flag is set (and so old users will not notice). This should be expected with the IORING_SETUP_DEFER_TASKRUN flag as it is not guaranteed that every task will result in a CQE. Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220830125013.570060-7-dylany@fb.com [axboe: fold in call_rcu() serialization fix] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring_types.h')
-rw-r--r--include/linux/io_uring_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index d56ff2185168..aa4d90a53866 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -184,6 +184,8 @@ struct io_ev_fd {
struct eventfd_ctx *cq_ev_fd;
unsigned int eventfd_async: 1;
struct rcu_head rcu;
+ atomic_t refs;
+ atomic_t ops;
};
struct io_alloc_cache {