qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] QMP event for suspend to disk
Date: Wed, 18 Jul 2012 08:17:48 -0600	[thread overview]
Message-ID: <5006C58C.5060500@redhat.com> (raw)
In-Reply-To: <20120718110226.23a50a7c@doriath.home>

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

On 07/18/2012 08:02 AM, Luiz Capitulino wrote:
> Hi,
> 
> QEMU can now distinguish between S4 and power off for the guest OSes that
> suspends to disk through S4. This means that we can have a QMP event for S4
> (so that QMP clients can distinguish between S3 and S4).
> 
> However, as we already emit the SHUTDOWN event for this, it turns out that
> there are three different ways of supporting the new event. We could:
> 
>  1. not emit the SHUTDOWN event and only emit the SUSPEND_DISK event
> 
>     cons: breaks compatibility, as we'll stop sending an event we send today.

At least the new 'query-events' monitor command will allow libvirt to
know which events to listen for; so this is workable.

> 
>  2. emit both, that is, first SUSPEND_DISK and then SHUTDOWN
> 
>     cons: emitting two very similar events.

This has the most back-compat, but is noisier in that it generates more
events.

> 
>  3. extend the SHUTDOWN event to say whether it's a suspend to disk or not,
>     like this:
> 
>        { "event": "SHUTDOWN", "data": { "suspend-to-disk": true }, ... }
> 
>     cons: we already have the SUSPEND event, so from an API perspective
>           it would make sense to have SUSPEND_DISK.
> 
> I prefer item 3, because it seems to be cleanest one.

I'm also liking 3, then 1, then 2; but think any of them will work from
libvirt's POV.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

      reply	other threads:[~2012-07-18 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 14:02 [Qemu-devel] QMP event for suspend to disk Luiz Capitulino
2012-07-18 14:17 ` Eric Blake [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=5006C58C.5060500@redhat.com \
    --to=eblake@redhat.com \
    --cc=anthony@codemonkey.ws \
    --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).