From: Markus Armbruster <armbru@redhat.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"David Hildenbrand" <david@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Eric Blake" <eblake@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v6 5/6] qapi: Add HV_BALLOON_STATUS_REPORT event
Date: Tue, 25 Jul 2023 10:04:08 +0200 [thread overview]
Message-ID: <87fs5cifif.fsf@pond.sub.org> (raw)
In-Reply-To: <22d53a9cc8756bc39b5d951436dc276fa2c665cc.1689786474.git.maciej.szmigiero@oracle.com> (Maciej S. Szmigiero's message of "Thu, 20 Jul 2023 12:13:02 +0200")
"Maciej S. Szmigiero" <mail@maciej.szmigiero.name> writes:
> From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
>
> Used by the hv-balloon driver for (optional) guest memory status reports.
Inhowfar optional? What enables / triggers it?
Use case for the event?
Could a status event make sense for other balloon drivers as well?
> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
> ---
> qapi/machine.json | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 5ede977cf2bc..9649616b9ed2 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1113,6 +1113,31 @@
> { 'event': 'BALLOON_CHANGE',
> 'data': { 'actual': 'int' } }
>
> +##
> +# @HV_BALLOON_STATUS_REPORT:
> +#
> +# Emitted when the hv-balloon driver receives a "STATUS" message from
> +# the guest.
Aha, the event is triggered by the guest. It must therefore be
rate-limited, just like BALLOON_CHANGE. To do that, add it to
monitor_qapi_event_conf[] in monitor/monitor.c, and document it as noted
below.
> +#
> +# @commited: the amount of memory in use inside the guest plus the amount
> +# of the memory unusable inside the guest (ballooned out,
> +# offline, etc.)
> +#
> +# @available: the amount of the memory inside the guest available for new
> +# allocations ("free")
Spelling: committed. Remember to update the example, too.
Please format like
# @committed: the amount of memory in use inside the guest plus the
# amount of the memory unusable inside the guest (ballooned out,
# offline, etc.)
#
# @available: the amount of the memory inside the guest available for
# new allocations ("free")
to blend in with recent commit a937b6aa739 (qapi: Reformat doc comments
to conform to current conventions).
> +#
To document rate-limiting, add:
# Note: this event is rate-limited.
#
> +# Since: TBD
> +#
> +# Example:
> +#
> +# <- { "event": "HV_BALLOON_STATUS_REPORT",
> +# "data": { "commited": 816640000, "available": 3333054464 },
> +# "timestamp": { "seconds": 1600295492, "microseconds": 661044 } }
> +#
> +##
> +{ 'event': 'HV_BALLOON_STATUS_REPORT',
> + 'data': { 'commited': 'size', 'available': 'size' } }
> +
> ##
> # @MemoryInfo:
> #
An event is commonly paired with a query command, so that QMP clients
can resynchronize state after missing events, e.g. when reconnecting
after a client restart.
query-balloon isn't such a query: it returns less than the event.
If a paired query doesn't make sense, explain why.
next prev parent reply other threads:[~2023-07-25 8:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 10:12 [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️) Maciej S. Szmigiero
2023-07-20 10:12 ` [PATCH v6 1/6] memory-device: Support empty memory devices Maciej S. Szmigiero
2023-07-20 10:12 ` [PATCH v6 2/6] memory-device: Drop size alignment check Maciej S. Szmigiero
2023-07-20 10:13 ` [PATCH v6 3/6] Add Hyper-V Dynamic Memory Protocol definitions Maciej S. Szmigiero
2023-07-20 10:13 ` [PATCH v6 4/6] qapi: Add HvBalloonDeviceInfo sub-type to MemoryDeviceInfo Maciej S. Szmigiero
2023-07-24 11:37 ` Markus Armbruster
2023-07-24 11:43 ` Maciej S. Szmigiero
2023-07-25 8:26 ` Markus Armbruster
2023-07-25 8:25 ` Markus Armbruster
2023-07-25 18:13 ` Maciej S. Szmigiero
2023-07-20 10:13 ` [PATCH v6 5/6] qapi: Add HV_BALLOON_STATUS_REPORT event Maciej S. Szmigiero
2023-07-25 8:04 ` Markus Armbruster [this message]
2023-07-25 18:13 ` Maciej S. Szmigiero
2023-07-20 10:13 ` [PATCH v6 6/6] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon) Maciej S. Szmigiero
2023-07-24 10:56 ` [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️) Markus Armbruster
2023-07-24 11:04 ` Maciej S. Szmigiero
2023-07-24 11:39 ` Markus Armbruster
2023-07-24 11:44 ` Maciej S. Szmigiero
2023-07-24 14:42 ` David Hildenbrand
2023-07-25 8:25 ` Markus Armbruster
2023-07-25 18:09 ` Maciej S. Szmigiero
2023-07-25 18:12 ` David Hildenbrand
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=87fs5cifif.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=david@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=mail@maciej.szmigiero.name \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.