io_uring: enable IORING_SETUP_ATTACH_WQ to attach to SQPOLL thread too
authorJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 20:50:27 +0000 (14:50 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 02:32:33 +0000 (20:32 -0600)
commitaa06165de863a09bceebef65ecaf19294b26fd2e
tree58e146c6b9d8d47a4ec8dfe35f007c41f5fa1b1b
parent69fb21310fd36aad96370e05953f2c2366f492e4
io_uring: enable IORING_SETUP_ATTACH_WQ to attach to SQPOLL thread too

We support using IORING_SETUP_ATTACH_WQ to share async backends between
rings created by the same process, this now also allows the same to
happen with SQPOLL. The setup procedure remains the same, the caller
sets io_uring_params->wq_fd to the 'parent' context, and then the newly
created ring will attach to that async backend.

This means that multiple rings can share the same SQPOLL thread, saving
resources.

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