All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Florian Westphal <fw@strlen.de>,
	Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
	"open list:Network Block Dev..." <qemu-block@nongnu.org>
Subject: Re: [PATCH for-8.0] nbd/server: Request TCP_NODELAY
Date: Tue, 28 Mar 2023 00:42:59 +0200	[thread overview]
Message-ID: <20230327224259.GA25361@breakpoint.cc> (raw)
In-Reply-To: <20230327192947.1324372-1-eblake@redhat.com>

Eric Blake <eblake@redhat.com> wrote:
> Nagle's algorithm adds latency in order to reduce network packet
> overhead on small packets.  But when we are already using corking to
> merge smaller packets into transactional requests, the extra delay
> from TCP defaults just gets in the way.
> 
> For reference, qemu as an NBD client already requests TCP_NODELAY (see
> nbd_connect() in nbd/client-connection.c); as does libnbd as a client
> [1], and nbdkit as a server [2].
> 
> [1] https://gitlab.com/nbdkit/libnbd/-/blob/a48a1142/generator/states-connect.c#L39
> [2] https://gitlab.com/nbdkit/nbdkit/-/blob/45b72f5b/server/sockets.c#L430
> 
> CC: Florian Westphal <fw@strlen.de>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>  nbd/server.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/nbd/server.c b/nbd/server.c
> index a4750e41880..976223860bf 100644
> --- a/nbd/server.c
> +++ b/nbd/server.c
> @@ -2755,6 +2755,7 @@ void nbd_client_new(QIOChannelSocket *sioc,
>      }
>      client->tlsauthz = g_strdup(tlsauthz);
>      client->sioc = sioc;
> +    qio_channel_set_delay(QIO_CHANNEL(cioc), false);

../nbd/server.c: In function 'nbd_client_new':
../nbd/server.c:2763:39: error: 'cioc' undeclared (first use in this function); did you mean 'sioc'?

Other than that this looks good to me.


  reply	other threads:[~2023-03-27 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 19:29 [PATCH for-8.0] nbd/server: Request TCP_NODELAY Eric Blake
2023-03-27 22:42 ` Florian Westphal [this message]
2023-03-28  0:32   ` Eric Blake

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 \
    --in-reply-to=20230327224259.GA25361@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=eblake@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.