Message ID | 20220630091231.1456789-1-dylany@fb.com (mailing list archive) |
---|---|
Headers | show |
Series | io_uring: multishot recv | expand |
On 6/30/22 3:12 AM, Dylan Yudaken wrote: > This series adds support for multishot recv/recvmsg to io_uring. > > The idea is that generally socket applications will be continually > enqueuing a new recv() when the previous one completes. This can be > improved on by allowing the application to queue a multishot receive, > which will post completions as and when data is available. It uses the > provided buffers feature to receive new data into a pool provided by > the application. > > This is more performant in a few ways: > * Subsequent receives are queued up straight away without requiring the > application to finish a processing loop. > * If there are more data in the socket (sat the provided buffer > size is smaller than the socket buffer) then the data is immediately > returned, improving batching. > * Poll is only armed once and reused, saving CPU cycles > > Running a small network benchmark [1] shows improved QPS of ~6-8% over > a range of loads. I have applied this, changing ->addr2 to ->ioprio for the flags bit as per the io_uring-5.19 branch. Pretty excited about recv multishot. I think it's an elegant model, and it has really nice performance improvements as well!
On Thu, 30 Jun 2022 02:12:19 -0700, Dylan Yudaken wrote: > This series adds support for multishot recv/recvmsg to io_uring. > > The idea is that generally socket applications will be continually > enqueuing a new recv() when the previous one completes. This can be > improved on by allowing the application to queue a multishot receive, > which will post completions as and when data is available. It uses the > provided buffers feature to receive new data into a pool provided by > the application. > > [...] Applied, thanks! [01/12] io_uring: allow 0 length for buffer select (no commit info) [02/12] io_uring: restore bgid in io_put_kbuf (no commit info) [03/12] io_uring: allow iov_len = 0 for recvmsg and buffer select (no commit info) [04/12] io_uring: recycle buffers on error (no commit info) [05/12] io_uring: clean up io_poll_check_events return values (no commit info) [06/12] io_uring: add IOU_STOP_MULTISHOT return code (no commit info) [07/12] io_uring: add allow_overflow to io_post_aux_cqe (no commit info) [08/12] io_uring: fix multishot poll on overflow (no commit info) [09/12] io_uring: fix multishot accept ordering (no commit info) [10/12] io_uring: multishot recv (no commit info) [11/12] io_uring: fix io_uring_cqe_overflow trace format (no commit info) [12/12] io_uring: only trace one of complete or overflow (no commit info) Best regards,