Skip to content

RFC Add support for IOSQE2_POLL_FIRST

Jens Axboe io-uring 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4io_uring: check IOPOLL/ioprio support upfrontfs/io_uring.c+52 -980 replies
2/4io_uring: add flags2 variablefs/io_uring.c include/uapi/linux/io_uring.h+35 -130 replies
3/4io_uring: add IOSQE2_POLL_FIRST flagfs/io_uring.c include/uapi/linux/io_uring.h+15 -10 replies
4/4io_uring: wire up IOSQE2_POLL_FIRST for send/sendmsg and recv/recvmsgfs/io_uring.c+12 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCHSET RFC 0/4] Add support for IOSQE2_POLL_FIRST

Hi,

For some workloads, it's not at all uncommon that every request will end up using the internal poll feature to trigger the successful execution of a request. This is quite common for network receive, where the application doesn't expect any data to be immediately available. Yet we still attempt to do this receive, then get -EAGAIN, arm poll, and trigger the retry based on poll.

This can be quite wasteful, and particularly so for cases where we expect to arm poll basically 100% of the time.

This series builds to adding support for asking io_uring to arm poll first, rather than first attempt an IO, and finally adds support for this feature to send/sendmsg and recv/recvmsg (with the two latter ones being the most useful, imho).

Given that most requests don't support IO priorities, a new flags2 field is added using that same space. The last bit we have in sqe->flags is added to say that "ioprio is really flags2". This does mean that any IOSQE2_ flags added cannot be used with IO priorities.

Signature · 1 line
Jens Axboe