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>
Sat, 5 Sep 2020 22:07:36 +0000 (16:07 -0600)
commiteeb9711daf2cab36d8c740677f1344668b79e2ac
treee93fbf165ea752c379390b0615ee0f49791bc1f7
parent762b3726232897ca897eb7039a4639442860e4aa
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