qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-8.0] nbd/server: Request TCP_NODELAY


From: Florian Westphal
Subject: Re: [PATCH for-8.0] nbd/server: Request TCP_NODELAY
Date: Tue, 28 Mar 2023 00:42:59 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]