diff options
author | 2023-04-13 15:28:08 +0100 | |
---|---|---|
committer | 2023-04-15 14:44:57 -0600 | |
commit | 4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f (patch) | |
tree | 87fada8191a92e179e90b93f594fcc013a05e147 /include/linux/io_uring_types.h | |
parent | io_uring/rsrc: refactor io_rsrc_ref_quiesce (diff) | |
download | linux-4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f.tar.gz linux-4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f.tar.bz2 linux-4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f.zip |
io_uring/rsrc: use wq for quiescing
Replace completions with waitqueues for rsrc data quiesce, the main
wakeup condition is when data refs hit zero. Note that data refs are
only changes under ->uring_lock, so we prepare before mutex_unlock()
reacquire it after taking the lock back. This change will be needed
in the next patch.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1d0dbc74b3b4fd67c8f01819e680c5e0da252956.1681395792.git.asml.silence@gmail.com
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h index 40cab420b1bd..5c9645319770 100644 --- a/include/linux/io_uring_types.h +++ b/include/linux/io_uring_types.h @@ -333,6 +333,7 @@ struct io_ring_ctx { /* protected by ->uring_lock */ struct list_head rsrc_ref_list; struct io_alloc_cache rsrc_node_cache; + struct wait_queue_head rsrc_quiesce_wq; struct list_head io_buffers_pages; |