From: Alon Levy <alevy@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Luiz Capitulino <lcapitulino@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
elmarco@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC 5/7] qxl-render: call ppm_save on callback
Date: Tue, 21 Feb 2012 19:40:16 +0200 [thread overview]
Message-ID: <20120221174016.GO6476@garlic> (raw)
In-Reply-To: <4F43C331.7090000@redhat.com>
On Tue, Feb 21, 2012 at 09:15:45AM -0700, Eric Blake wrote:
> On 02/21/2012 01:19 AM, Alon Levy wrote:
>
> >>> (2) Async monitor command. Keeps interface and works nicely. A bunch
> >>> of QAPI bits tickled into master meanwhile, so we could look at
> >>> this again. Luiz? What is the status here?
> >>>
> >>> (3) Something like this patch + additionally introduce a
> >>> "your-screenshot-is-finished-now" qmp event. Will break existing
> >>> users too. But at least they can be adapted without requiring
> >>> some external, nonportable service like inotify ...
> >>
> >> Libvirt would want 3) - any command that becomes async also needs an
> >> event to tell us when the command is completed, so that libvirt can
> >> maintain the synchronous interface to the user (and/or expose a new flag
> >> to allow the user to also benefit from the asynchronous command).
> >
> > If I do 2) then libvirt won't notice because the monitor command will
> > block as usual. Only change would be internal, qemu would continue
> > processing other fds in the interim.
>
> I guess I misunderstood things then. I was assuming that an async
> monitor command would mean that the monitor command would return control
> to libvirt prior to the screenshot file being completely written; but
> libvirt promises a synchronous interface to callers (that is, a caller
> using virDomainScreenshot won't get a response until the screenshot file
> has started streaming, but that means the file had better be consistent,
> and not something that gets modified after libvirt has streamed it to
> the caller). I don't particularly care which solution we have, as long
> as the overall result is still something where libvirt has guarantees
> that the complete screenshot file is available before libvirt then hands
> control of that file back to the caller.
Yes, that's the misunderstanding I think everyone is liable to have
because it is called "Asyncronous", but in actuallity the implementation
of an async monitor command is just what I mentioned: internal to qemu
the main thread select loop continuous to run until a callback completes
the monitor command. The monitor is suspended during that time, so no
change to the monitor user (i.e. libvirt) is visible.
Luiz said that this interface is going to be dropped, so we don't want
to introduce another user to it now. So the question becomes if there is
something equivalent. I totally agree the name "async monitor" should be
resereved for the behavior you describe above, and not for the one I
just described. In that case there may still be room for an improvement
to the monitor commands, maybe only selectively used to not force a lot
of code churn, that will allow any command that requires some long
computation / operation to take place before returning to the caller
(synchronously from it's point of view), while still being responsive by
handling any other callbacks that have nothing to do with the monitor in
the mean time. Something identical in practice to what is correcntly
called "async monitor".
>
> --
> Eric Blake eblake@redhat.com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
next prev parent reply other threads:[~2012-02-21 19:54 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-19 21:27 [Qemu-devel] [RFC 0/7] qxl: fix hangs caused by qxl_render_update Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 1/7] sdl: remove NULL check, g_malloc0 can't fail Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 2/7] qxl: drop qxl_spice_update_area_async definition Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 3/7] qxl: introduce QXLCookie Alon Levy
2012-02-20 10:56 ` Gerd Hoffmann
2012-02-20 12:31 ` Alon Levy
2012-02-20 12:39 ` Gerd Hoffmann
2012-02-19 21:28 ` [Qemu-devel] [RFC 4/7] qxl: make qxl_render_update async Alon Levy
2012-02-20 11:10 ` Gerd Hoffmann
2012-02-20 12:32 ` Alon Levy
2012-02-20 12:45 ` Gerd Hoffmann
2012-02-19 21:28 ` [Qemu-devel] [RFC 5/7] qxl-render: call ppm_save on callback Alon Levy
2012-02-20 11:32 ` Gerd Hoffmann
2012-02-20 12:36 ` Alon Levy
2012-02-20 12:49 ` Gerd Hoffmann
2012-02-20 21:29 ` Eric Blake
2012-02-21 8:19 ` Alon Levy
2012-02-21 16:15 ` Eric Blake
2012-02-21 17:40 ` Alon Levy [this message]
2012-02-22 13:17 ` Luiz Capitulino
2012-02-22 13:22 ` Alon Levy
2012-02-22 13:49 ` Luiz Capitulino
2012-02-22 14:22 ` Gerd Hoffmann
2012-02-22 14:29 ` Alon Levy
2012-02-22 15:55 ` Luiz Capitulino
2012-02-22 16:35 ` Alon Levy
2012-02-22 19:27 ` Luiz Capitulino
2012-02-22 14:28 ` Alon Levy
2012-02-22 14:47 ` Gerd Hoffmann
2012-02-22 15:26 ` Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 6/7] qxl: use spice_qxl_update_area_dirty_async Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 7/7] qxl: add allocator Alon Levy
2012-02-20 11:41 ` Gerd Hoffmann
2012-02-20 12:38 ` Alon Levy
2012-02-20 13:18 ` Gerd Hoffmann
2012-02-20 17:36 ` Alon Levy
2012-02-21 7:57 ` Gerd Hoffmann
2012-02-21 8:26 ` Alon Levy
2012-02-21 9:20 ` Gerd Hoffmann
2012-02-21 9:59 ` 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=20120221174016.GO6476@garlic \
--to=alevy@redhat.com \
--cc=eblake@redhat.com \
--cc=elmarco@redhat.com \
--cc=kraxel@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).