qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Wenchao Xia <xiawenc@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, armbru@redhat.com,
	stefanha@redhat.com, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent
Date: Tue, 22 Oct 2013 04:46:14 +0100	[thread overview]
Message-ID: <5265F506.7010603@redhat.com> (raw)
In-Reply-To: <5265EEDC.3080900@linux.vnet.ibm.com>

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

On 10/22/2013 04:19 AM, Wenchao Xia wrote:

>>> +#
>>> +# @POWERDOWN: system power down, if it is suppoted
>> s/suppoted/supported/
>>
>> Events aren't issued if they aren't supported, so that phrase is
>> pointless.
>   Ok, I will skip that phrase. The point here is that, many people are
> confused
> about shutdown and powerdown, and it seems POWERDOWN item is not present
> in doc/qmp/qapi-events.txt?

That's a bug in the existing docs, then :)

> I want to add doc tips the difference:
> How about: It will set the system power control unit to notify guest,
> such as
> ACPI chips.(This is where I am not sure, the qemu online doc says,
> shutdown is
> gracefully....).

Based on patch 3/6, the SHUTDOWN event is triggered if
qemu_shutdown_requested() is called, and the POWERDOWN event is issued
if qemu_shutdown_requested() is issued.  I'm fuzzy myself on the
conditions behind those two requests, maybe someone else can chime in.

>>> +#
>>> +# @STOP: stops the emulation
>>> +#
>> Your use of present tense makes it sounds like this is a causal command
>> ("issuing STOP will stop the emulation"), but you really want it to
>> sound like a notification of an effect ("STOP is issued after emulation
>> is stopped).  That is:
>>
>> s/stops the emulation/emulation stopped/
>   Do you mean all tense in the doc should use past tense?

Yes.

> I hesitated before about tense usage, it seems not all event
> is emitted after it happens, for example, powerdown emitted before
> it call notifier to set the states.

Implementation wise, we may issue some events before the action.  But
events are asynchronous by nature, we cannot guarantee that management
reads the event from QMP in any particular order, and in MOST cases,
management won't know about the event until AFTER we have done the
action, even if we queued the event for delivery on the front end of the
action.  It's better to just document ALL events as generically being
past tense.

>   Take another think, I think I may use past tense through the doc,
> but with more carefully meaning, such as:
> the system has enter powerdown state.
>   If you agree with the tense, I'd like sent the reformed doc
> in the following, before respin.
> 

Indeed, which is why separating the docs from the refactoring made sense
in your series, so that we could hammer out good docs.


-- 
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: 621 bytes --]

  reply	other threads:[~2013-10-22  3:46 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21  2:15 [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically Wenchao Xia
2013-10-21  2:16 ` [Qemu-devel] [PATCH 1/6] block: use type MonitorEvent directly Wenchao Xia
2013-10-21  2:16 ` [Qemu-devel] [PATCH 2/6] qapi: rename MonitorEvent to QEvent Wenchao Xia
2013-10-21 20:38   ` Eric Blake
2013-11-01 14:02   ` Luiz Capitulino
2013-11-01 14:21     ` [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter Gareth Bult
2013-11-04  1:59     ` [Qemu-devel] [PATCH 2/6] qapi: rename MonitorEvent to QEvent Wenchao Xia
2013-11-04 13:33       ` Luiz Capitulino
2013-11-05  2:17         ` Wenchao Xia
2013-11-05  2:51           ` Luiz Capitulino
2013-11-05  5:31             ` Wenchao Xia
2013-11-05 14:06               ` Luiz Capitulino
2013-11-06  3:25                 ` Wenchao Xia
2013-10-21  2:16 ` [Qemu-devel] [PATCH 3/6] qapi: rename prefix QEVENT to Q_EVENT Wenchao Xia
2013-10-21 20:41   ` Eric Blake
2013-10-22  2:43     ` Wenchao Xia
2013-10-28 10:44     ` Paolo Bonzini
2013-10-29  5:22       ` Wenchao Xia
2013-10-29 16:09         ` Eric Blake
2013-10-30  7:26           ` Wenchao Xia
2013-11-01 14:06           ` Luiz Capitulino
2013-10-29 18:18     ` Kevin Wolf
2013-10-30  7:27       ` Wenchao Xia
2013-10-30 11:55         ` Paolo Bonzini
2013-10-31  5:26           ` Wenchao Xia
2013-10-21  2:16 ` [Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json Wenchao Xia
2013-10-21 20:45   ` Eric Blake
2013-10-21  2:16 ` [Qemu-devel] [PATCH 5/6] qapi: remove var monitor_event_names[] Wenchao Xia
2013-10-21 20:47   ` Eric Blake
2013-10-21  2:16 ` [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent Wenchao Xia
2013-10-21 21:00   ` Eric Blake
2013-10-22  3:19     ` Wenchao Xia
2013-10-22  3:46       ` Eric Blake [this message]
2013-10-23  0:37         ` Wenchao Xia
2013-10-29 23:02           ` Eric Blake
2013-10-30  7:51             ` Wenchao Xia
2013-10-22  6:55     ` Wenchao Xia
2013-10-22  7:33       ` Wenchao Xia
2013-10-22  8:58       ` Eric Blake
2013-10-25  9:16 ` [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically Wenchao Xia
2013-11-01 14:28 ` Luiz Capitulino
2013-11-04  1:54   ` Wenchao Xia

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=5265F506.7010603@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /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).