The SQPOLL support is useful as it stands, but for various use cases it's less useful than it could be. In no particular order: - We currently require root. I'd like to "relax" that to CAP_SYS_NICE instead, which I think fits quite nicely with it. - You get one poll thread per ring. For cases that use multiple rings, this isn't necessary and is also quite wasteful. Patch 1 is a cleanup, patch 2 allows CAP_SYS_NICE for SQPOLL, and the remaining patches gradually work our way to be able to support shared SQPOLL threads. The latter works exactly like IORING_SETUP_ATTACH_WQ, where we currently support just sharing the io-wq backend between threads. With this added, we also support the SQPOLL thread. I'm sure there are some quirks and issues to iron out in the SQPOLL series, but some initial testing shows it working for me and it passes the test suite. I'll run some more testing, reviews would be more than welcome. fs/io_uring.c | 385 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 268 insertions(+), 117 deletions(-) -- Jens Axboe