From: Eric Blake <eblake@redhat.com>
To: Sanidhya Kashyap <sanidhya.iiith@gmail.com>,
qemu list <qemu-devel@nongnu.org>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH v1 4/5] VMState test: set the frequency of the vmstate testing process
Date: Mon, 07 Jul 2014 12:25:38 -0600 [thread overview]
Message-ID: <53BAE622.8070706@redhat.com> (raw)
In-Reply-To: <1404753484-26693-5-git-send-email-sanidhya.iiith@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]
On 07/07/2014 11:18 AM, Sanidhya Kashyap wrote:
> This patch introduces the mechanism to update the sleep interval - sinterval.
>
> Signed-off-by: Sanidhya Kashyap <sanidhya.iiith@gmail.com>
> ---
> hmp-commands.hx | 15 +++++++++++++++
> hmp.c | 14 ++++++++++++++
> hmp.h | 1 +
> qapi-schema.json | 10 ++++++++++
> qmp-commands.hx | 22 ++++++++++++++++++++++
> savevm.c | 13 +++++++++++++
> 6 files changed, 75 insertions(+)
>
> +++ b/qapi-schema.json
> @@ -3492,3 +3492,13 @@
> { 'command': 'test-vmstates',
> 'data': {'*times' : 'int',
> '*sinterval' : 'int' } }
> +
> +## @test-vmstates-set-sinterval
> +#
> +# sets the sleep interval between iterations of the vmstate testing process
> +# @sinterval: the updated sleep interval value
in what units?
> +#
> +# Since 2.1
2.2.
> +##
> +{ 'command' : 'test-vmstates-set-sinterval',
> + 'data' : { 'sinterval': 'int' } }
This feels like a write-only command. How do I query what it is
currently set to?
I'm also afraid that we aren't learning our lessons from migrate.
Adding one new command per new tunable does not scale very well in the
number of commands that need to be maintained or that have to be wired
up in management software; better is adding a single command pair for
set/get that can be easily introspected (to see when new tunables are
added), by taking an array of tunables where each tunable is a struct
containing name, type, and value information. Something like:
{"execute":"test-vmstates-set-tuning", "arguments":{ "list":[
{ "name":"sinterval", "type":"int", "value":100 },
{ "name":"other", "type":"...", "value":... }
]}}
{"return": {}}
and a counterpart:
{"execute":"test-vmstates-get-tuning" }
{"return": [
{ "name":"sinterval", "type":"int", "value":100 },
{ "name":"other", "type":"...", "value":... }
]}
> +void qmp_test_vmstates_set_sinterval(int64_t sinterval, Error **errp)
> +{
> + VMStateLogState *v = vmstate_current_state();
> + if (sinterval < TEST_VMSTATE_MIN_INTERVAL_MS ||
> + sinterval > TEST_VMSTATE_MAX_INTERVAL_MS) {
> + error_setg(errp, "sleep interval value must be "
> + "in the defined range [%d, %d](ms)\n",
> + TEST_VMSTATE_MIN_INTERVAL_MS, TEST_VMSTATE_MAX_INTERVAL_MS);
This range limit should also be mentioned in the public API (.json) file.
--
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: 604 bytes --]
next prev parent reply other threads:[~2014-07-07 18:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 17:17 [Qemu-devel] [RFC PATCH v1 0/5] VMState testing Sanidhya Kashyap
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 1/5] QEMUSizedBuffer/QEMUFile Sanidhya Kashyap
2014-07-07 18:28 ` Eric Blake
2014-07-08 7:48 ` Dr. David Alan Gilbert
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing mechanism Sanidhya Kashyap
2014-07-07 17:33 ` Eric Blake
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 3/5] VMState test: hmp interface for vmstate testing Sanidhya Kashyap
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 4/5] VMState test: set the frequency of the vmstate testing process Sanidhya Kashyap
2014-07-07 18:25 ` Eric Blake [this message]
2014-07-18 18:59 ` Sanidhya Kashyap
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 5/5] VMState test: cancel mechanism for an already running " Sanidhya Kashyap
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=53BAE622.8070706@redhat.com \
--to=eblake@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=sanidhya.iiith@gmail.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).