qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RfC PATCH 00/10] vnc buffer handling
Date: Fri, 25 Sep 2015 11:56:18 +0200	[thread overview]
Message-ID: <56051A42.8050902@kamp.de> (raw)
In-Reply-To: <1443084128-25552-1-git-send-email-kraxel@redhat.com>

Am 24.09.2015 um 10:41 schrieb Gerd Hoffmann:
>   Hi,
>
> Here is a patch series to improve the vnc buffer handling.  It picks up
> the qio_buffer patches from Daniel, adds move calls (move data from one
> buffer to another) and tracing, makes vnc use the new features.  Net
> effect should be that (a) vnc copies less data around and (b) buffers
> don't grow forever.
>
> It's RfC because it depends on wip patches.  My plan is to wait for
> Daniels patch series to be merged (which should obsolete patches #1+#2),
> then rebase and repost the series.
>
> Patches are also available from git:
>   git://git.kraxel.org/qemu rebase/ui-vnc-next
>
> please test & review,
>   Gerd

Looks fine except for the missing output handler due to the drop of vnc_write in vnc_jobs_consume_buffer.

However, I would add the following optimization:

diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
index dfc5139..4b384b0 100644
--- a/ui/vnc-jobs.c
+++ b/ui/vnc-jobs.c
@@ -228,6 +232,11 @@ static int vnc_worker_thread_loop(VncJobQueue *queue)
         vnc_unlock_output(job->vs);
         goto disconnected;
     }
+
+    if (qio_buffer_empty(&job->vs->output)) {
+        qio_buffer_move_empty(&vs.output, &job->vs->output);
+    }
+

The idea is that the vs->output is at the end of the queue and will be dropped by the next qio_buffer_move_empty anyway.
So why not reuse it as worker thread output buffer? This reduces reallocs to zero for me after the initial transmission of the desktop.

The buffers however still only allowed to grow during the ongoing session.

Peter

      parent reply	other threads:[~2015-09-25  9:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24  8:41 [Qemu-devel] [RfC PATCH 00/10] vnc buffer handling Gerd Hoffmann
2015-09-24  8:41 ` [Qemu-devel] [RfC PATCH 01/10] io/ makefile fluff Gerd Hoffmann
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 02/10] io: pull Buffer code out of VNC module Gerd Hoffmann
2015-09-25  9:57   ` Peter Lieven
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 03/10] vnc: make the Buffer capacity increase in powers of two Gerd Hoffmann
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 04/10] io: add qio_buffer_init Gerd Hoffmann
2015-09-25  9:56   ` Peter Lieven
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 05/10] io: add qio_buffer_move_empty Gerd Hoffmann
2015-09-25  9:56   ` Peter Lieven
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 06/10] io: add qio_buffer_move Gerd Hoffmann
2015-09-25  9:57   ` Peter Lieven
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 07/10] io: add qio_buffer tracing Gerd Hoffmann
2015-09-25  8:10   ` Peter Lieven
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 08/10] name vnc buffers Gerd Hoffmann
2015-09-25  7:28   ` Peter Lieven
2015-09-25  7:58   ` Peter Lieven
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 09/10] vnc: kill jobs queue buffer Gerd Hoffmann
2015-09-25  9:57   ` Peter Lieven
2015-09-24  8:42 ` [Qemu-devel] [RfC PATCH 10/10] vnc-jobs: move buffer reset, use new buffer move Gerd Hoffmann
2015-09-25  9:39   ` Peter Lieven
2015-09-24 16:25 ` [Qemu-devel] [RfC PATCH 00/10] vnc buffer handling Daniel P. Berrange
2015-09-25  9:56 ` 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=56051A42.8050902@kamp.de \
    --to=pl@kamp.de \
    --cc=kraxel@redhat.com \
    --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).