qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 4/5] console: pass Monitor to vga_hw_screen_dump/hw_vga_dump
Date: Tue, 13 Mar 2012 15:07:19 -0300	[thread overview]
Message-ID: <20120313150719.08171bf8@doriath.home> (raw)
In-Reply-To: <20120313173524.GO27659@garlic.redhat.com>

On Tue, 13 Mar 2012 19:35:24 +0200
Alon Levy <alevy@redhat.com> wrote:

> On Tue, Mar 13, 2012 at 12:59:17PM -0300, Luiz Capitulino wrote:
> > On Tue, 13 Mar 2012 16:46:12 +0200
> > Alon Levy <alevy@redhat.com> wrote:
> > 
> > > On Tue, Mar 13, 2012 at 10:35:55AM -0300, Luiz Capitulino wrote:
> > > > On Sun, 11 Mar 2012 21:26:43 +0200
> > > > Alon Levy <alevy@redhat.com> wrote:
> > > > 
> > > > > Passes the Monitor ptr to the screendump implementation to all for
> > > > > monitor suspend and resume for qxl to fix screendump regression.
> > > > > 
> > > > > graphics_console_init signature change required touching every
> > > > > implemented of screen_dump. There is no change other then an added
> > > > > parameter. qxl will make use of it in the next patch.
> > > > 
> > > > NACK on this one.
> > > > 
> > > > The Monitor object should be restricted to HMP. This patch spreads it to
> > > > what's going to be the QMP implementation of screendump.
> > > > 
> > > > The first step here should be to convert the screendump command to the qapi,
> > > > and lock the HMP shell in hmp_screendump().
> > > > 
> > > > However, this brings a new interesting problem: the HMP implementation is
> > > > actually a QMP client, meaning that it won't have a way to figure out
> > > > screendump completion either :)
> > > > 
> > > > Some solutions that come to my mind:
> > > > 
> > > >  1. Pool the screendump file creation from a timer.
> > > > 
> > > >     Cons: it may return before the file is fully written to disk
> > > > 
> > > 
> > > We know what the file size should be, so we can poll for the actual
> > > size. Actually why do we need to poll? we could add a
> > > "internal.screendump.complete" or "internal-query-screendump", no?
> > 
> > Neither is possible because hmp.c really uses QMP as client, except that it's
> > done via C.
> > 
> > > >  2. Use inotify
> > > > 
> > > >     Cons: what about windows?
> > > > 
> > > >  3. Introduce query-screendump that returns the last screendump status
> > > > 
> > > >     Cons: this is actually making screendump async
> > > > 
> > > > 
> > > > Anthony, do you have any ideas?
> > > > 
> > > > Btw, I've started doing the screendump conversion to the qapi, I'll post it
> > > > soon.
> > > 
> > > I've already sent patches once for a new qapi command, I don't mind you
> > > doing this of course.
> > 
> > It would actually help me if you do it, I have an initial version at:
> > 
> >  git://repo.or.cz/qemu/qmp-unstable.git qmp-wip/qapi-commands-conv/screendump/rfc
> > 
> > It's old and it's on top of some uninteresting stuff, the only commits that
> > matter there are 48e7c01b and 0f5509a8. But this rfc is just to have an idea
> > how the final command will look like.
> > 
> > From what I barely remember, I'd suggest you to do the following:
> > 
> >  1. Pass the Error object to hw_screen_dump()
> >  2. Convert the screendump command to the qapi
> >  3. Report errors from ppm_save() via Error
> > 
> > Important note: my code reports only QERR_OPEN_FILE_FAILED in ppm_save(), but
> > the right thing to do is to report most likely errors like EACCESS, ENOSPC,
> > EPERM, EIO etc.
> 
> ok, I'll take it. Note that I'm going to not send the qxl screendump
> behavior changing patch again, I think all alternatives to a real async
> screendump suck, including libvirt changes, and the current behavior of
> giving an old screendump is good enough hopefully for the real users,
> which are:

Fine with me, you can add a note in screendump's documentation in qapi-schema.json
explaining qxl's behavior.

  reply	other threads:[~2012-03-13 18:10 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-11 16:39 [Qemu-devel] [PATCH 0/4] fix qxl screendump using monitor_suspend Alon Levy
2012-03-11 16:39 ` [Qemu-devel] [PATCH 1/4] qxl: switch qxl.c to trace-events Alon Levy
2012-03-11 16:39 ` [Qemu-devel] [PATCH 2/4] qxl/qxl_render.c: add trace events Alon Levy
2012-03-11 16:39 ` [Qemu-devel] [PATCH 3/4] console: pass Monitor to vga_hw_screen_dump/hw_vga_dump Alon Levy
2012-03-11 16:39 ` [Qemu-devel] [PATCH 4/4] qxl-render: call ppm_save on bh Alon Levy
2012-03-11 19:26 ` [Qemu-devel] [PATCH v2 0/5] fix qxl screendump using monitor_suspend Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 1/5] qxl: switch qxl.c to trace-events Alon Levy
2012-03-12 10:20     ` Gerd Hoffmann
2012-03-12 11:43       ` Alon Levy
2012-03-12 15:50         ` Alon Levy
2012-03-13  6:42           ` Gerd Hoffmann
2012-03-13  9:35             ` Alon Levy
2012-03-13  9:47               ` Gerd Hoffmann
2012-03-13 10:18                 ` Alon Levy
2012-03-13 10:26                 ` Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 2/5] qxl/qxl_render.c: add trace events Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 3/5] qxl-render: call ppm_save on bh Alon Levy
2012-03-13 13:22     ` Luiz Capitulino
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 4/5] console: pass Monitor to vga_hw_screen_dump/hw_vga_dump Alon Levy
2012-03-13 13:35     ` Luiz Capitulino
2012-03-13 14:46       ` Alon Levy
2012-03-13 15:59         ` Luiz Capitulino
2012-03-13 17:35           ` Alon Levy
2012-03-13 18:07             ` Luiz Capitulino [this message]
2012-03-14  8:25             ` Gerd Hoffmann
2012-03-14  8:32               ` Alon Levy
2012-03-14  8:14         ` Gerd Hoffmann
2012-03-14  8:37           ` Daniel P. Berrange
2012-03-14 12:32             ` Luiz Capitulino
2012-03-14 13:14               ` Alon Levy
2012-03-14 13:17                 ` Daniel P. Berrange
2012-03-14 13:18                 ` Luiz Capitulino
2012-03-14 13:43                   ` Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 5/5] qxl: screendump: use provided Monitor Alon Levy
2012-03-11 19:33 ` [Qemu-devel] [PATCH 0/4] fix qxl screendump using monitor_suspend 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=20120313150719.08171bf8@doriath.home \
    --to=lcapitulino@redhat.com \
    --cc=alevy@redhat.com \
    --cc=aliguori@us.ibm.com \
    --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).