mbox series

[for-next,0/4] io_uring: multishot recv cleanups

Message ID 20220708181838.1495428-1-dylany@fb.com (mailing list archive)
Headers show
Series io_uring: multishot recv cleanups | expand

Message

Dylan Yudaken July 8, 2022, 6:18 p.m. UTC
These are some preparatory cleanups that are separate but required for a
later series doing multishot recvmsg (will post this shortly).

Patches:
1: fixes a bug where a socket may receive data before polling
2: makes a similar change to compat logic for providing no iovs
for buffer_select
3/4: move the recycling logic into the io_uring main framework which makes
it a bit easier for recvmsg multishot

Dylan Yudaken (4):
  io_uring: fix multishot ending when not polled
  io_uring: support 0 length iov in buffer select in compat
  io-uring: add recycle_async to ops
  io_uring: move netmsg recycling into io_uring cleanup

 io_uring/io_uring.c |  8 ++++++--
 io_uring/net.c      | 35 ++++++++++++++++++++---------------
 io_uring/net.h      |  1 +
 io_uring/opdef.c    |  2 ++
 io_uring/opdef.h    |  1 +
 5 files changed, 30 insertions(+), 17 deletions(-)


base-commit: 8007202a9a4854eb963f1282953b1c83e91b8253

Comments

Jens Axboe July 11, 2022, 8:54 p.m. UTC | #1
On Fri, 8 Jul 2022 11:18:34 -0700, Dylan Yudaken wrote:
> These are some preparatory cleanups that are separate but required for a
> later series doing multishot recvmsg (will post this shortly).
> 
> Patches:
> 1: fixes a bug where a socket may receive data before polling
> 2: makes a similar change to compat logic for providing no iovs
> for buffer_select
> 3/4: move the recycling logic into the io_uring main framework which makes
> it a bit easier for recvmsg multishot
> 
> [...]

Applied, thanks!

[1/4] io_uring: fix multishot ending when not polled
      commit: a8723bb79e40713f6c27564b1d17824d7ff67efb
[2/4] io_uring: support 0 length iov in buffer select in compat
      commit: 20898aeac6b82d8eb6247754494584b2f6cafd53

Best regards,
Jens Axboe July 11, 2022, 8:55 p.m. UTC | #2
On 7/8/22 12:18 PM, Dylan Yudaken wrote:
> These are some preparatory cleanups that are separate but required for a
> later series doing multishot recvmsg (will post this shortly).
> 
> Patches:
> 1: fixes a bug where a socket may receive data before polling
> 2: makes a similar change to compat logic for providing no iovs
> for buffer_select
> 3/4: move the recycling logic into the io_uring main framework which makes
> it a bit easier for recvmsg multishot

Applied 1-2, because I don't think the cleanup is necessarily correct. Do
we always hold ctx->uring_lock for io_clean_op()? I can see two ways
in there - one we definitely do, but from the __io_req_complete_put() or
io_free_req() path that doesn't seem to be the case. Hmm?
Dylan Yudaken July 12, 2022, 8:32 a.m. UTC | #3
On Mon, 2022-07-11 at 14:55 -0600, Jens Axboe wrote:
> On 7/8/22 12:18 PM, Dylan Yudaken wrote:
> > These are some preparatory cleanups that are separate but required
> > for a
> > later series doing multishot recvmsg (will post this shortly).
> > 
> > Patches:
> > 1: fixes a bug where a socket may receive data before polling
> > 2: makes a similar change to compat logic for providing no iovs
> > for buffer_select
> > 3/4: move the recycling logic into the io_uring main framework
> > which makes
> > it a bit easier for recvmsg multishot
> 
> Applied 1-2, because I don't think the cleanup is necessarily
> correct. Do
> we always hold ctx->uring_lock for io_clean_op()? I can see two ways
> in there - one we definitely do, but from the __io_req_complete_put()
> or
> io_free_req() path that doesn't seem to be the case. Hmm?
> 

You're right. Sorry about that - i will send out v2 of the recvmsg
patch series without it.