qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel@nongnu.org, Marc-Andre Lureau <mlureau@redhat.com>,
	armbru@redhat.com, Anthony Liguori <anthony@codemonkey.ws>,
	kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/4] add qmp screendump-async
Date: Wed, 29 Feb 2012 10:15:53 +0200	[thread overview]
Message-ID: <20120229081553.GD8200@garlic> (raw)
In-Reply-To: <20120228171039.36c394a3@doriath.home>

On Tue, Feb 28, 2012 at 05:10:39PM -0300, Luiz Capitulino wrote:
> On Sat, 25 Feb 2012 10:46:07 +0200
> Alon Levy <alevy@redhat.com> wrote:
> 
> > On Fri, Feb 24, 2012 at 04:40:15PM -0600, Anthony Liguori wrote:
> > > On 02/24/2012 03:22 PM, Alon Levy wrote:
> > > >This is an across the board change since I wanted to keep the existing
> > > >(good imo) single graphic_console_init callback setter, instead of
> > > >introducing a new cb that isn't set by it but instead by a second
> > > >initialization function.
> > > >
> > > >Signed-off-by: Alon Levy<alevy@redhat.com>
> > > 
> > > What's the rationale for this?
> > 
> > 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 display channel messages.

> 
> > 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 is true, but it is not the immediate problem the bz is dealing with
- if it was only this there would be no hang.

> 
> Now, the problem you describe above is different and maybe it shouldn't
> be solved at QMP level. Can you describe it in more detail?
> 

I can just point to the diagram I put into the mail from october:

"""
This fixes a hang that is caused when the spice client is also a qemu
monitor client and the client is single threaded:


  io thread                   worker thread                client

   <---------------------------------------------------- screendump
  do_screen_dump-> read------->
                               flush, read
                               client socket------------->
"""

I have not managed to reproduce this myself, so I'm cc'ing Marc-Andre
who has and reported the fix of using an asyncronous operation
internally (unrelated to the asynchronous qevent in this patchset)
between the monitor thread and the spice thread fixed the problem.

> > > I really don't want a plethora of pseudo-async commands.
> 
> Agreed, but this is not supposed to be pseudo-async. If a command returns
> immediately and sends an event when it later completes, it's really async.
Thanks for saying this. I didn't understand the pseudo-async angle.

  parent reply	other threads:[~2012-02-29  8:16 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
2012-02-29 14:52           ` Luiz Capitulino
2012-02-29  8:15         ` Alon Levy [this message]
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=20120229081553.GD8200@garlic \
    --to=alevy@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mlureau@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).