From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCAaD-0002Zq-1M for qemu-devel@nongnu.org; Tue, 29 Jul 2014 12:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCAa7-0000Zo-8Z for qemu-devel@nongnu.org; Tue, 29 Jul 2014 12:49:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCAa7-0000Zj-12 for qemu-devel@nongnu.org; Tue, 29 Jul 2014 12:48:55 -0400 Message-ID: <53D7D074.3070006@redhat.com> Date: Tue, 29 Jul 2014 10:48:52 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406302776-2306-1-git-send-email-sanidhya.iiith@gmail.com> <1406302776-2306-10-git-send-email-sanidhya.iiith@gmail.com> In-Reply-To: <1406302776-2306-10-git-send-email-sanidhya.iiith@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MEHUOISTjqkiaHbMpeBgCgQHtbwoQB1M6" Subject: Re: [Qemu-devel] [PATCH RFC v2 09/12] VMState test: update period of vmstate testing process List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sanidhya Kashyap , qemu list Cc: "Dr. David Alan Gilbert" , Juan Quintela This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MEHUOISTjqkiaHbMpeBgCgQHtbwoQB1M6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/25/2014 09:39 AM, Sanidhya Kashyap wrote: > No particular change, except variable name. Since I am not modifying ot= her > variables, so I have not made the command generic. This sentence feels like changelog information compared to v1; as such, it belongs... >=20 > Signed-off-by: Sanidhya Kashyap > --- =2E..here, for use in the mail but not part of the commit itself. On the= other hand, the commit itself should mention the name of the QMP command it is adding (I shouldn't have to read the body of the patch to see what the command name is). > qapi-schema.json | 12 ++++++++++++ > qmp-commands.hx | 23 +++++++++++++++++++++++ > savevm.c | 13 +++++++++++++ > 3 files changed, 48 insertions(+) >=20 > diff --git a/qapi-schema.json b/qapi-schema.json > index a12872f..13e922e 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -3562,3 +3562,15 @@ > # Since 2.2 > ## > { 'command': 'query-test-vmstates', 'returns': 'VMStateLogStateInfo' }= > + > +## > +# @test-vmstates-set-period > +# > +# sets the sleep interval between iterations of the vmstate testing pr= ocess > +# > +# @period: the updated sleep interval value (in milliseconds) > +# > +# Since 2.2 > +## > +{ 'command' : 'test-vmstates-set-period', > + 'data' : { 'period': 'int' } } Is it possible that we might add other tunables in the future? If so, this command is not very scalable (we would be adding one command per new tunable). On the other hand, adding complexity to achieve a generic setter is not worth it if we only expect one tunable. > +void qmp_test_vmstates_set_period(int64_t period, Error **errp) > +{ > + VMStateLogState *v =3D vmstate_current_state(); > + if (period < TEST_VMSTATE_MIN_INTERVAL_MS || > + period > TEST_VMSTATE_MAX_INTERVAL_MS) { > + error_setg(errp, "sleep interval (period) value must be " > + "in the defined range [%d, %d](ms)\n", > + TEST_VMSTATE_MIN_INTERVAL_MS, TEST_VMSTATE_MAX_INTE= RVAL_MS); > + return; > + } > + v->period =3D period; > +} This looks like it takes effect whether or not a vmstate test is underway. Does this impact the default of the next vmstate test to start, in the case where that command doesn't supply a value for period but relies on the default? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --MEHUOISTjqkiaHbMpeBgCgQHtbwoQB1M6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT19B0AAoJEKeha0olJ0NqLXUH/R9fuMYom6IKIJUm4+89/1p6 p3l99f6Gz6yqJ2ycmYP8eRpdwWC8/GoPVihsrwwX2JnlOPcjom5xZQHjC6ExVDbl 3AWRrQz+FP6re84qqFWRQEWcdDVsgrAjImQSJ5WJn3Z4cIXKWwe3L/bFxr7XzYDO piyBDdOJBK/5/rXj9b79+mhrQbu8k4JSf8V9gfONhFtnmG8ccmwY6hRORdtpyRlm g/zo2L90HrIgx34E3Zpg+6B2/d0PpFXYzRwJaJKbAuEiqdR2LB0+JpRryCGkM42F c0LmESNCtE7V2dfDeUJ5I1dclB+a0NBTICEU/OYlOqjcjUbIgEcyNwdKqqbkHWE= =/nJf -----END PGP SIGNATURE----- --MEHUOISTjqkiaHbMpeBgCgQHtbwoQB1M6--