io_uring: remove unneeded io_send_zc accounting
PATCH 1/1 io_uring: remove unneeded io_send_zc accounting
zc->len and zc->buf are not actually used once you get to the retry stage. The buffer remains in kmsg->msg.msg_iter, which is setup in io_send_setup.
Note: it still seems needed in io_send due to io_send_select_buffer needing it (for the len parameter).
---
Hi,
I'm reasonably sure this is correct - but I think Pavel might want to double check that I did not miss anything. The tests seem to pass with no changes.
Thanks,
Dylan
io_uring/net.c | 2 -- 1 file changed, 2 deletions(-)
io_uring/net.c +0 -2
@@ -1493,8 +1493,6 @@ int io_send_zc(struct io_kiocb *req, unsigned int issue_flags)return -EAGAIN ;if (ret >0 &&io_net_retry (sock, kmsg->msg.msg_flags)) { - zc->len -= ret; - zc->buf += ret; zc->done_io += ret;return -EAGAIN ; }
base-commit: 26a4cfaff82a2dcb810f6bfd5f4842f9b6046c8a
Signature · 1 line
2.50.1
Quoted 6 lines · Dylan Yudaken
zc->lenandzc->bufare not actually used once you get to the retry stage. The buffer remains inkmsg->msg.msg_iter, which is setup inio_send_setup.
Note: it still seems needed inio_senddue toio_send_select_bufferneeding it (for the len parameter).
Quoted 7 lines
Signed-off-by Dylan Yudaken <[email protected]>---
Hi,I'm reasonably sure this is correct - but I think Pavel might want to double check that I did not miss anything. The tests seem to pass with no changes.
Looks good, I'll have a look tomorrow
Signature · 1 line
Pavel Begunkov
Pavel Begunkov
Reviewed-byQuoted 11 lines · Pavel Begunkov
Quoted 10 lines · Dylan Yudaken
zc->lenandzc->bufare not actually used once you get to the retry stage. The buffer remains inkmsg->msg.msg_iter, which is setup inio_send_setup.
Note: it still seems needed inio_senddue toio_send_select_bufferneeding it (for the len parameter).Signed-off-by Dylan Yudaken <[email protected]>---
Hi,
Quoted 5 lines
Quoted 3 lines
I'm reasonably sure this is correct - but I think Pavel might want to double check that I did not miss anything. The tests seem to pass with no changes.
Looks good, I'll have a look tomorrow
I like the change, and we should get rid of duplication between send and sendmsg on top.
Signature · 1 line
Pavel Begunkov
Jens Axboe
maintainerQuoted 6 lines · Dylan Yudaken
zc->lenandzc->bufare not actually used once you get to the retry stage. The buffer remains inkmsg->msg.msg_iter, which is setup inio_send_setup.
Note: it still seems needed inio_senddue toio_send_select_bufferneeding it (for the len parameter).
Quoted 7 lines
Signed-off-by Dylan Yudaken <[email protected]>---
Hi,I'm reasonably sure this is correct - but I think Pavel might want to double check that I did not miss anything. The tests seem to pass with no changes.
FWIW looks good to me, and we should probably move towards just tracking state in iov_iter for the other paths too and get rid of this. Wild handwaving, haven't actually looked at it, but it'd be a nice cleanup.
Signature · 1 line
Jens Axboe
Quoted 8 lines · Dylan Yudaken
zc->lenandzc->bufare not actually used once you get to the retry stage. The buffer remains inkmsg->msg.msg_iter, which is setup inio_send_setup.
Note: it still seems needed inio_senddue toio_send_select_bufferneeding it (for the len parameter).[...]
Applied, thanks!
[1/1] io_uring: remove unneeded io_send_zc accounting
commit: 046fcc83ac1ba8747f0bcae13f5e433802735245
Best regards,
Signature · 1 line
Jens Axboe