public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Constantine Gavrilov <[email protected]>
Cc: [email protected]
Subject: Re: Short sends returned in IORING
Date: Wed, 4 May 2022 07:54:05 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAL3td0UD3Ht-rCpR5xUfmOLzeEzRSedCVXH4nTQKLR1b16+vA@mail.gmail.com>

On 5/3/22 5:05 PM, Constantine Gavrilov wrote:
> Jens:
> 
> This is related to the previous thread "Fix MSG_WAITALL for
> IORING_OP_RECV/RECVMSG".
> 
> We have a similar issue with TCP socket sends. I see short sends
> regarding of the method (I tried write, writev, send, and sendmsg
> opcodes, while using MSG_WAITALL for send and sendmsg). It does not
> make a difference.
> 
> Most of the time, sends are not short, and I never saw short sends
> with loopback and my app. But on real network media, I see short
> sends.
> 
> This is a real problem, since because of this it is not possible to
> implement queue size of > 1 on a TCP socket, which limits the benefit
> of IORING. When we have a short send, the next send in queue will
> "corrupt" the stream.
> 
> Can we have complete send before it completes, unless the socket is
> disconnected?

I'm guessing that this happens because we get a task_work item queued
after we've processed some of the send, but not all. What kernel are you
using?

This:

https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.19/io_uring&id=4c3c09439c08b03d9503df0ca4c7619c5842892e

is queued up for 5.19, would be worth trying.

-- 
Jens Axboe


  reply	other threads:[~2022-05-04 13:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 23:05 Short sends returned in IORING Constantine Gavrilov
2022-05-04 13:54 ` Jens Axboe [this message]
2022-05-04 15:21   ` Constantine Gavrilov
2022-05-04 15:28     ` Jens Axboe
2022-05-04 15:55       ` Jens Axboe
2022-05-11 14:56         ` Constantine Gavrilov
2022-05-11 15:11           ` Constantine Gavrilov
2022-05-11 15:33             ` Constantine Gavrilov
2022-05-11 19:30               ` Constantine Gavrilov
2022-05-12 16:28           ` Jens Axboe
2022-05-15 13:36             ` Constantine Gavrilov
2022-05-16 12:50               ` Constantine Gavrilov
2022-05-04 16:18   ` Constantine Gavrilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox