qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Alon Levy <alevy@redhat.com>,
	armbru@redhat.com, Anthony Liguori <anthony@codemonkey.ws>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] add qmp screendump-async
Date: Wed, 29 Feb 2012 08:49:10 +0100	[thread overview]
Message-ID: <4F4DD876.1080707@redhat.com> (raw)
In-Reply-To: <20120228171039.36c394a3@doriath.home>

  Hi,

>> There is a hang possible with the current screendump command, qxl, a
>> spice client using libvirt and spice-gtk such as virt-viewer /
>> remote-viewer, where you have:
>> 1. libvirt waiting for screendump to complete
>> 2. screendump waiting for spice server thread to render
>> 3. spice server thread waiting for spice client to read messages
> 
> Which messages?

spice protocol.

>> 4. spice client == libvirt client, waiting for screendump completion
> 
> The way I had understood this problem is that qxl takes a long time to
> perform a screen dump, which would cause the global mutex to be held for
> a long time. If this is really serious, then a async command for it
> makes sense IMO.

That describes it pretty good.  Normal workflow is that spice-server
sends the rendering commands received from the guest off to the spice
client and the actual rendering happens there.  spice-server also keeps
track of the rendering commands so it can actually render on the host
side too of needed (called 'local rendering').  But it doesn't do that
unless it has to to avoid wasting cycles.  Events which need local
rendering are:  (1) display on sdl/vnc, (2) screendump monitor command,
 (3) guest requesting screen content (happens when doing screen shots
for example).

So when issuing the screendump monitor command we have to ask
spice-server to render the screen for us, when it is done we can write
out the screen dump.  We don't want block the iothread while the spice
server is busy does the rendering.

Additionally the local rendering can be delayed by a spice-client
connected via slow network link.  This is (3) in alon's list above.
There are plans to fix that, but it isn't trivial to do due to the way
spice-server keeps track of the rendering commands.  It can delay the
rendering several seconds.  But even without that I've seen delays
around 50ms, which is still way too much to have iothread blocked.

cheers,
  Gerd

  reply	other threads:[~2012-02-29  7:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-24 21:22 [Qemu-devel] [PATCH 1/4] qapi-schema: fix typos and explain 'spice' auth Alon Levy
2012-02-24 21:22 ` [Qemu-devel] [PATCH 2/4] qjson.h: include compiler.h for GCC_FMT_ATTR Alon Levy
2012-02-28 19:58   ` Luiz Capitulino
2012-02-28 20:49     ` Alon Levy
2012-02-24 21:22 ` [Qemu-devel] [PATCH 3/4] monitor, console: add QEVENT_SCREEN_DUMP_COMPLETE Alon Levy
2012-02-28 20:01   ` Luiz Capitulino
2012-02-28 20:51     ` Alon Levy
2012-02-29 14:38       ` Luiz Capitulino
2012-02-24 21:22 ` [Qemu-devel] [PATCH 4/4] add qmp screendump-async Alon Levy
2012-02-24 22:40   ` Anthony Liguori
2012-02-25  8:46     ` Alon Levy
2012-02-28 20:10       ` Luiz Capitulino
2012-02-29  7:49         ` Gerd Hoffmann [this message]
2012-02-29 14:52           ` Luiz Capitulino
2012-02-29  8:15         ` Alon Levy
2012-02-29 14:58           ` Luiz Capitulino
2012-02-29 15:37             ` Alon Levy
2012-02-28 20:05   ` Luiz Capitulino
2012-02-29  8:39     ` Alon Levy
2012-02-29 14:59       ` Luiz Capitulino
2012-03-05 13:40     ` Alon Levy
2012-03-05 13:45     ` Alon Levy
2012-02-28  8:05 ` [Qemu-devel] [PATCH 1/4] qapi-schema: fix typos and explain 'spice' auth Alon Levy
2012-02-28 19:57 ` Luiz Capitulino
2012-02-29  8:40   ` Alon Levy

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=4F4DD876.1080707@redhat.com \
    --to=kraxel@redhat.com \
    --cc=alevy@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@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).