From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCBlv-0002dP-PR for qemu-devel@nongnu.org; Tue, 29 Jul 2014 14:05:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCBlq-0000AO-28 for qemu-devel@nongnu.org; Tue, 29 Jul 2014 14:05:11 -0400 Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]:34894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCBlp-00008R-Q5 for qemu-devel@nongnu.org; Tue, 29 Jul 2014 14:05:05 -0400 Received: by mail-pa0-f43.google.com with SMTP id lf10so24665pab.16 for ; Tue, 29 Jul 2014 11:05:04 -0700 (PDT) Message-ID: <53D7E246.2040303@gmail.com> Date: Tue, 29 Jul 2014 23:34:54 +0530 From: Sanidhya Kashyap 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> <53D7D074.3070006@redhat.com> In-Reply-To: <53D7D074.3070006@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Eric Blake , qemu list Cc: "Dr. David Alan Gilbert" , Juan Quintela -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> +# +# 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. > I was thinking of making it scalable as you already pointed out in the previous patch but it does not look like there is something going to be added in the future. So, that's why I am stuck with a single parameter change. >> +void qmp_test_vmstates_set_period(int64_t period, Error **errp) >> +{ + VMStateLogState *v = 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_INTERVAL_MS); + >> return; + } + v->period = 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 Yes > start, in the case where that command doesn't supply a value for > period but relies on the default? No, it does not. - -- - ----- Sanidhya Kashyap -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJT1+JFAAoJEFt9RLmoahln4qcIAJngjCqqQtDCjuAPnGxQnamM Y7IUNe9Z0fGIYp88tHZN32cpaxbMkT+BEL7QeJDynrXcaH+SVIwOepPQNYqVdzzh q4ldQW/D5VxC/xKXtenHZbAx3+Iat00dHHutq8y4ezR1DH9N1GfTHyKCewP6WP96 dy4RAJvKgItpRfu3FuGoLRxqWbAre1NrwydQZtiv3C1t14sM/Ua2j7Syp5vhhCtM GtQrhKt2I1Hr0fGupbarLWRNKXyCBi7XgDG6+NvJNP6ECAh5GeVmQ7e9L891tL3b wi9a4GNL45sVLa3tLBG81aGIn1XJOX6UEdRJIqWyIKCkC/LS417waitb1oWWfYw= =9HHf -----END PGP SIGNATURE-----