From: Peter Lieven <pl@kamp.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] ui/vnc: set TCP_NODELAY
Date: Tue, 02 Sep 2014 11:54:17 +0200 [thread overview]
Message-ID: <540593C9.5010302@kamp.de> (raw)
In-Reply-To: <CAFEAcA8RUePD2n5vgUbkzWow4db587e_gtigavDFsFgzAOWv5w@mail.gmail.com>
On 02.09.2014 11:36, Peter Maydell wrote:
> On 2 September 2014 10:21, Peter Lieven <pl@kamp.de> wrote:
>> we currently have the Nagle algorithm enabled for all outgoing VNC updates.
>> This may delay sensitive updates as mouse movements or typing in the console.
>> As we currently prepare all data in a buffer and then send as much as we can
>> this should not cause big trouble. Well established VNC servers like TightVNC
>> set TCP_NODELAY as well.
>> A regular framebuffer update request generates exactly one framebuffer update
>> which should be pushed out as fast as possible.
>>
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>> ui/vnc.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/ui/vnc.c b/ui/vnc.c
>> index 1bc1ae0..b12d0ea 100644
>> --- a/ui/vnc.c
>> +++ b/ui/vnc.c
>> @@ -2885,6 +2885,10 @@ static void vnc_listen_read(void *opaque, bool websocket)
>> }
>>
>> if (csock != -1) {
>> +#ifdef TCP_NODELAY
>> + int flag = 1;
>> + setsockopt(csock, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int));
>> +#endif
>> vnc_connect(vs, csock, false, websocket);
> Why not just call socket_set_nodelay() ?
I was not aware of that helper function. Thanks for the pointer.
Peter
>
> thanks
> -- PMM
prev parent reply other threads:[~2014-09-02 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 9:21 [Qemu-devel] [PATCH] ui/vnc: set TCP_NODELAY Peter Lieven
2014-09-02 9:36 ` Peter Maydell
2014-09-02 9:54 ` Peter Lieven [this message]
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=540593C9.5010302@kamp.de \
--to=pl@kamp.de \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).