Skip to content

io_uring SQPOLL improvements

Jens Axboe io-uring 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8io_uring: io_sq_thread() doesn't need to flush signalsfs/io_uring.c+0 -20 replies
2/8io_uring: allow SQPOLL with CAP_SYS_NICE privilegesfs/io_uring.c+1 -10 replies
3/8io_uring: use private ctx wait queue entries for SQPOLLfs/io_uring.c+19 -150 replies
4/8io_uring: move SQPOLL post-wakeup ring need wakeup flag into wake handlerfs/io_uring.c+13 -10 replies
5/8io_uring: split work handling part of SQPOLL into helperfs/io_uring.c+96 -870 replies
6/8io_uring: split SQPOLL data into separate structurefs/io_uring.c+73 -310 replies
7/8io_uring: base SQPOLL handling off io_sq_datafs/io_uring.c+72 -290 replies
8/8io_uring: enable IORING_SETUP_ATTACH_WQ to attach to SQPOLL thread toofs/io_uring.c+43 -07 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchJiufei XueJoseph Qi
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET for-next 0/8] io_uring SQPOLL improvements

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(-)
Signature · 1 line
Jens Axboe