io_uring: add support for sharing kernel io-wq workqueue for-5.6/io_uring-vfs-shared-wq
authorJens Axboe <axboe@kernel.dk>
Thu, 23 Jan 2020 22:59:43 +0000 (15:59 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jan 2020 17:06:59 +0000 (10:06 -0700)
commit2d8aed73db9b966ada7202adc2d12e85e932b041
tree21974e38cc823ca20d635945c7712e2eeaf66ded
parentdfdb613443df1f9e5d592ce339efdade31322975
io_uring: add support for sharing kernel io-wq workqueue

An id field is added to io_uring_params, which always returns the ID of
the io-wq backend that is associated with an io_uring context. If an 'id'
is provided and IORING_SETUP_SHARED is set in the creation flags, then
we attempt to attach to an existing io-wq instead of setting up a new one.

This allows creation of "sibling" io_urings, where we prefer to keep the
SQ/CQ private, but want to share the async backend to minimize the amount
of overhead associated with having multiple rings that belong to the same
backend.

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