VMState testing
cover VMState testing
Hi,
This patch series introduces a mechanism to test the vmstates' information. Currently, this is achieved by saving the device states' information to a memory buffer - an abstraction provided by QEMUFile pointer (David's patch) and then clearing the states followed by loading the data from the buffer. Currently, this is just a basic implementation in which one cannot test a particular device - due to the issues in the reset functionality. In the next version of the patch, I will try to work on this issue so that the vmstate checking is possible for every device. This will help the users to enable checking of a device at the time of saving and loading of its state.
I have tried to provide the both of the hmp and qmp commands interface to dump and load the vmstates. Besides this, one can either cancel an already running testing process or update the required sleep interval between iteration.
With these patches, I haven't found any bug in the device states. I wish I am on the right track.
Dr. David Alan Gilbert (1):
QEMUSizedBuffer/QEMUFile
Sanidhya Kashyap (4):
VMState test: basic vmstate testing mechanism
VMState test: hmp interface for vmstate testing
VMState test: set the frequency of the vmstate testing process VMState test: cancel mechanism for an already running vmstate testing
process
hmp-commands.hx | 44 +++++ hmp.c | 34 ++++ hmp.h | 3 + include/migration/qemu-file.h | 27 +++ qapi-schema.json | 31 ++++ qemu-file.c | 411 ++++++++++++++++++++++++++++++++++++++++++ qmp-commands.hx | 70 +++++++ savevm.c | 174 ++++++++++++++++++ 8 files changed, 794 insertions(+)
Signature · 1 line
1.9.3
RFC PATCH 1/5 QEMUSizedBuffer/QEMUFile
From: "Dr. David Alan Gilbert" <[email protected]>
Using the patch of Stefan Berger for memory buffer based QEMUFile.
http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html
In the words of David:
"""
Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers that can be written to or read from. """
--- include/migration/qemu-file.h | 27 +++ qemu-file.c | 411 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 438 insertions(+)
include/migration/qemu-file.h +27 -0
@@ -25,6 +25,8 @@#define QEMU_FILE_H 1#include "exec/cpu-common.h" +#include <stdint.h> +/* This function writes a chunk of data to a file at the given position. * The pos argument can be ignored if the file is only being used for * streaming. The handler should try to write all of the data it can.
@@ -94,11 +96,31 @@ typedef struct QEMUFileOps {QEMURamSaveFunc *save_page; } QEMUFileOps; +struct QEMUSizedBuffer { +struct iovec *iov; +size_t n_iov; +size_t size;/* total allocated size in all iov's */ +size_t used;/* number of used bytes */ +}; + +typedef struct QEMUSizedBuffer QEMUSizedBuffer ; +QEMUSizedBuffer *qsb_create (const uint8_t *buffer,size_t len); +QEMUSizedBuffer *qsb_clone (const QEMUSizedBuffer *); +void qsb_free (QEMUSizedBuffer *); +size_t qsb_set_length (QEMUSizedBuffer *qsb,size_t length); +size_t qsb_get_length (const QEMUSizedBuffer *qsb); +ssize_t qsb_get_buffer (const QEMUSizedBuffer *,off_t start,size_t count, +uint8_t **buf); +ssize_t qsb_write_at (QEMUSizedBuffer *qsb,const uint8_t *buf, +off_t pos,size_t count); + +QEMUFile *qemu_fopen_ops (void *opaque,const QEMUFileOps *ops);QEMUFile *qemu_fopen (const char *filename,const char *mode);QEMUFile *qemu_fdopen (int fd,const char *mode);QEMUFile *qemu_fopen_socket (int fd,const char *mode);QEMUFile *qemu_popen_cmd (const char *command,const char *mode); +QEMUFile *qemu_bufopen (const char *mode,QEMUSizedBuffer *input);int qemu_get_fd (QEMUFile *f);int qemu_fclose (QEMUFile *f);int64_t qemu_ftell (QEMUFile *f);
@@ -111,6 +133,11 @@ void qemu_put_byte(QEMUFile *f, int v);void qemu_put_buffer_async (QEMUFile *f,const uint8_t *buf,int size);bool qemu_file_mode_is_not_valid (const char *mode); +/* +* For use on files opened with qemu_bufopen +*/ +const QEMUSizedBuffer *qemu_buf_get (QEMUFile *f); +static inline void qemu_put_ubyte (QEMUFile *f,unsigned int v) {qemu_put_byte (f, (int )v);
qemu-file.c +411 -0
414 lines not on this page · raw message
Signature · 1 line
1.9.3
RFC PATCH 2/5 VMState test: basic vmstate testing mechanism
In reply to Sanidhya KashyapThis patch introduces the mechanism to test the devices state by storing and dumping in in the QEMUFile pointer.
The testing is done as follows:
1) The VM is halted.
2) guest state is synchronized.
3) Then the device state is dumped to a temporary memory.
4) The guest state is reset.
5) Then the device state is loaded from the temporary memory.
6) The guest is resumed.
If the guest resumes, then there is no issue with the vmstates.
Currently, in this patch, I am directly using the qemu_system_reset() function to reset all the states of the guest. But, what I have found is that there is a difference in the registration of devices' reset function in QEMUResetEntry and in SaveStateEntry. Since, we dump and load all the devices information using the SaveStateEntry, but the reseting of the devices takes place with the help of QEMUResetEntry. Thus, in future, I will try to use the qdevified device tree to reset the functions.
As of now, I am providing DPRINTF to know about the amount of time spend in saving and loading the data from the buffer. If there is any other way that should be used to print the stats, then please do let me know.
--- qapi-schema.json | 12 +++++ qmp-commands.hx | 28 +++++++++++ savevm.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+)
qapi-schema.json +12 -0
@@ -3480,3 +3480,15 @@ # Since: 2.1 ## { 'command': 'rtc-reset-reinjection' } + +## @test-vmstates +# +# tests the vmstates' value by dumping and loading in memory +# @times: total iterations +# @sinterval: sleep interval between iteration +# +# Since 2.1 +## +{ 'command': 'test-vmstates', + 'data': {'*times' : 'int', + '*sinterval' : 'int' } }
qmp-commands.hx +28 -0
@@ -3755,3 +3755,31 @@ Example: <- { "return": {} } EQMP + + { + .name = "test-vmstates", + .args_type = "times:i?,sinterval:i?", + .mhandler.cmd_new = qmp_marshal_input_test_vmstates, + }, + +SQMP +test-vmstates +-------------------- + +Tests the vmstates' entry by dumping and loading in/from memory + +Arguments: + +- "times" : the total iterations for vmstates testing. The default + value is 10. +- "sinterval": the sleep interval between the iterations. The default + value is 100 milliseconds. + +Example: + +-> { "execute": "test-vmstates", + "arguments": { + "times": 10 + "sinterval": 100 } } +<- { "return": {} } +EQMP
savevm.c +148 -0
154 lines not on this page · raw message
Signature · 1 line
1.9.3
RFC PATCH 3/5 VMState test: hmp interface for vmstate testing
In reply to Sanidhya KashyapAdded hmp interface.
--- hmp-commands.hx | 15 +++++++++++++++ hmp.c | 14 ++++++++++++++ hmp.h | 1 + 3 files changed, 30 insertions(+)
hmp-commands.hx +15 -0
@@ -1788,6 +1788,21 @@ STEXI show available trace events and their state ETEXI + { + .name = "test-vmstates", + .args_type = "times:i?,sinterval:i?", + .params = "times sinterval", + .help = "test the vmstates by dumping and loading form memory\n\t\t\t" + "times: number of times, the vmstates will be tested\n\t\t\t" + "sinterval: sleep interval in milliseconds between each iteration", + .mhandler.cmd = hmp_test_vmstates, + }, +STEXI +@item test-vmstates +@findex test-vmstates +dumps and reads the device state's data from the memory for testing purpose +ETEXI + STEXI @end table ETEXI
hmp.c +14 -0
@@ -1714,3 +1714,17 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)monitor_printf (mon,"\n" ); } + +void hmp_test_vmstates (Monitor *mon,const QDict *qdict) +{ +int64_t times =qdict_get_try_int (qdict,"times" ,10 ); +int64_t sleep_interval =qdict_get_try_int (qdict,"sinterval" ,100 ); +Error *err =NULL ; + +qmp_test_vmstates (!!times, times, !!sleep_interval, sleep_interval, &err); + +if (err) { +monitor_printf (mon,"test-vmstates: %s\n" ,error_get_pretty (err)); +error_free (err); + } +}
hmp.h +1 -0
@@ -94,6 +94,7 @@ void hmp_cpu_add(Monitor *mon, const QDict *qdict);void hmp_object_add (Monitor *mon,const QDict *qdict);void hmp_object_del (Monitor *mon,const QDict *qdict);void hmp_info_memdev (Monitor *mon,const QDict *qdict); +void hmp_test_vmstates (Monitor *mon,const QDict *qdict);void object_add_completion (ReadLineState *rs,int nb_args,const char *str);void object_del_completion (ReadLineState *rs,int nb_args,const char *str);void device_add_completion (ReadLineState *rs,int nb_args,const char *str);
Signature · 1 line
1.9.3
RFC PATCH 4/5 VMState test: set the frequency of the vmstate testing process
In reply to Sanidhya KashyapThis patch introduces the mechanism to update the sleep interval - sinterval.
--- 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(+)
hmp-commands.hx +15 -0
@@ -1803,6 +1803,21 @@ STEXI dumps and reads the device state's data from the memory for testing purpose ETEXI + { + .name = "test-vmstates-set-sinterval", + .args_type = "sinterval:i", + .params = "sinterval", + .help = "set the sleep interval for vmstates testing process\n\t\t\t" + "sinterval: the new sleep interval value to replace the existing", + .mhandler.cmd = hmp_test_vmstates_set_sinterval, + }, + +STEXI +@item test_vmstates-set-sinterval @var{sinterval} +@findex test-vmstates-set-sinterval +Set the sinterval to @var{sinterval} (int) for vmstate testing process. +ETEXI + STEXI @end table ETEXI
hmp.c +14 -0
@@ -1728,3 +1728,17 @@ void hmp_test_vmstates(Monitor *mon, const QDict *qdict)error_free (err); } } + +void hmp_test_vmstates_set_sinterval (Monitor *mon,const QDict *qdict) +{ +int64_t sleep_interval =qdict_get_int (qdict,"sinterval" ); +Error *err =NULL ; + +qmp_test_vmstates_set_sinterval (sleep_interval, &err); + +if (err) { +monitor_printf (mon,"test-vmstates-set-frequency: %s\n" , +error_get_pretty (err)); +error_free (err); + } +}
hmp.h +1 -0
@@ -95,6 +95,7 @@ void hmp_object_add(Monitor *mon, const QDict *qdict);void hmp_object_del (Monitor *mon,const QDict *qdict);void hmp_info_memdev (Monitor *mon,const QDict *qdict);void hmp_test_vmstates (Monitor *mon,const QDict *qdict); +void hmp_test_vmstates_set_sinterval (Monitor *mon,const QDict *qdict);void object_add_completion (ReadLineState *rs,int nb_args,const char *str);void object_del_completion (ReadLineState *rs,int nb_args,const char *str);void device_add_completion (ReadLineState *rs,int nb_args,const char *str);
qapi-schema.json +10 -0
@@ -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 +# +# Since 2.1 +## +{ 'command' : 'test-vmstates-set-sinterval', + 'data' : { 'sinterval': 'int' } }
qmp-commands.hx +22 -0
@@ -3783,3 +3783,25 @@ Example: "sinterval": 100 } } <- { "return": {} } EQMP + + { + .name = "test-vmstates-set-sinterval", + .args_type = "sinterval:i", + .mhandler.cmd_new = qmp_marshal_input_test_vmstates_set_sinterval, + }, + +SQMP +test-vmstates-set-sinterval +-------------------- + +Update the sleep interval for the remaining iterations + +Arguments: + +- "sinterval": the updated sleep interval between iterations (json-int) + +Example: + +-> { "execute": "test-vmstates-set-sinterval", "arguments": { "sinterval": 1024 } } +<- { "return": {} } +EQMP
savevm.c +13 -0
@@ -1285,6 +1285,19 @@ void qmp_test_vmstates(bool has_times, int64_t times,timer_mod (v->timer,qemu_clock_get_ms (QEMU_CLOCK_REALTIME )); } +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 ); +return ; + } + v->sleep_interval = sinterval; +} +void qmp_xen_save_devices_state (const char *filename,Error **errp) {QEMUFile *f;
Signature · 1 line
1.9.3
RFC PATCH 5/5 VMState test: cancel mechanism for an already running vmstate testing process
In reply to Sanidhya KashyapThis patch helps in cancelling an already executing vmstate testing process.
--- hmp-commands.hx | 14 ++++++++++++++ hmp.c | 6 ++++++ hmp.h | 1 + qapi-schema.json | 9 +++++++++ qmp-commands.hx | 20 ++++++++++++++++++++ savevm.c | 17 +++++++++++++++-- 6 files changed, 65 insertions(+), 2 deletions(-)
hmp-commands.hx +14 -0
@@ -1818,6 +1818,20 @@ STEXI Set the sinterval to @var{sinterval} (int) for vmstate testing process. ETEXI + { + .name = "test-vmstates-cancel", + .args_type = "", + .params = "", + .help = "cancel the current vmstates testing process", + .mhandler.cmd = hmp_test_vmstates_cancel, +}, + +STEXI +@item test-vmstates-cancel +@findex test-vmstates-cancel +Cancel the current vmstates testing process +ETEXI + STEXI @end table ETEXI
hmp.c +6 -0
@@ -1742,3 +1742,9 @@ void hmp_test_vmstates_set_sinterval(Monitor *mon, const QDict *qdict)error_free (err); } } + +void hmp_test_vmstates_cancel (Monitor *mon,const QDict *qdict) +{ +qmp_test_vmstates_cancel (NULL ); +} +
hmp.h +1 -0
@@ -96,6 +96,7 @@ void hmp_object_del(Monitor *mon, const QDict *qdict);void hmp_info_memdev (Monitor *mon,const QDict *qdict);void hmp_test_vmstates (Monitor *mon,const QDict *qdict);void hmp_test_vmstates_set_sinterval (Monitor *mon,const QDict *qdict); +void hmp_test_vmstates_cancel (Monitor *mon,const QDict *qdict);void object_add_completion (ReadLineState *rs,int nb_args,const char *str);void object_del_completion (ReadLineState *rs,int nb_args,const char *str);void device_add_completion (ReadLineState *rs,int nb_args,const char *str);
qapi-schema.json +9 -0
@@ -3502,3 +3502,12 @@ ## { 'command' : 'test-vmstates-set-sinterval', 'data' : { 'sinterval': 'int' } } + +## +# @log-dirty-bitmap-cancel +# +# cancel the testing vmstates process +# +# Since 2.1 +## +{ 'command': 'test-vmstates-cancel' }
qmp-commands.hx +20 -0
@@ -3805,3 +3805,23 @@ Example: -> { "execute": "test-vmstates-set-sinterval", "arguments": { "sinterval": 1024 } } <- { "return": {} } EQMP + + { + .name = "test-vmstates-cancel", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_test_vmstates_cancel, + }, + +SQMP +test-vmstates-cancel +-------------- + +Cancel the current vmstate testing process. + +Arguments: None. + +Example: + +-> { "execute": "test-vmstates-cancel" } +<- { "return": {} } +EQMP
savevm.c +15 -2
@@ -1229,8 +1229,13 @@ static void vmstate_test_cb(void *opaque)if (saved_vm_running) {vm_start (); } -timer_mod (v->timer,qemu_clock_get_ms (QEMU_CLOCK_REALTIME ) + - v->sleep_interval); + +if (v->active_state) { +timer_mod (v->timer, v->sleep_interval + +qemu_clock_get_ms (QEMU_CLOCK_REALTIME )); + }else { + goto testing_end; + }return ; }
@@ -1298,6 +1303,14 @@ void qmp_test_vmstates_set_sinterval(int64_t sinterval, Error **errp) v->sleep_interval = sinterval; } +void qmp_test_vmstates_cancel (Error **errp) +{ +VMStateLogState *v =vmstate_current_state (); +if (v->active_state) { + v->active_state = false; + } +} +void qmp_xen_save_devices_state (const char *filename,Error **errp) {QEMUFile *f;
Signature · 1 line
1.9.3
Re: [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing mechanism
In reply to Sanidhya KashyapQuoted 12 lines · Sanidhya Kashyap
This patch introduces the mechanism to test the devices state by storing and dumping in in the QEMUFile pointer.
The testing is done as follows:
1) The VM is halted.
2) guest state is synchronized.
3) Then the device state is dumped to a temporary memory.
4) The guest state is reset.
5) Then the device state is loaded from the temporary memory.
6) The guest is resumed.
qapi-schema.json line 3487
Quoted 5 lines
qapi-schema.json +5
-0+ +## @test-vmstates +# +# tests the vmstates' value by dumping and loading in memory +# @times: total iterations
Missing the #optional flag; what does it default to if not specified?
Quoted 1 line
+# @sinterval: sleep interval between iteration
in what unit? Missing the #optional flag; what does it default to if not specified?
Review
Quoted 2 lines
(quoted diff) +2
-0+# +# Since 2.1
You've missed hard freeze for 2.1; this is a new feature, and at the earliest it can only be introduced in 2.2.
Review
Quoted 11 lines
(quoted diff) +10
-0+## +{ 'command': 'test-vmstates', + 'data': {'*times' : 'int', + '*sinterval' : 'int' } } +Arguments: + +- "times" : the total iterations for vmstates testing. The default + value is 10. +- "sinterval": the sleep interval between the iterations. The default + value is 100 milliseconds.
Ah, you provided more documentation in the .hx file than in the .json. I hate the redundancy, but it's better to include it in both files.
savevm.c void do_savevm(Monitor *mon, const QDict *qdict) · line 1146
Quoted 12 lines
+++
b/savevm.csavevm.c +7
-0@@ -1137,6 +1137,154 @@ void do_savevm(Monitor *mon, const QDict *qdict) } } +#ifdef DEBUG_TEST_VMSTATES +#define DPRINTF (fmt, ...) \ + do { printf("vmstate_test: " fmt, ## __VA_ARGS__); } while (0) +#else +#define DPRINTF (fmt, ...) \ + do { } while (0) +#endif
Wasn't there another series proposed that ensures that even when debugging is disabled that the compiler still compiles printf* statements under an if(0) block to prevent bit-rot? I didn't bother to look it up now in the archives, but you should reuse that approach.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [RFC PATCH v1 4/5] VMState test: set the frequency of the vmstate testing process
In reply to Sanidhya KashyapQuoted 15 lines · Sanidhya Kashyap
This patch introduces the mechanism to update the sleep interval - sinterval.
Signed-off-by Sanidhya Kashyap <[email protected]>--- 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
qapi-schema.json line 3499
Quoted 8 lines
qapi-schema.json +5
-0@@ -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?
Review line 3501
Quoted 2 lines
(quoted diff) +2
-0+# +# Since 2.1
2.2.
qapi-schema.json line 3504
Quoted 3 lines
qapi-schema.json +3
-0+## +{ '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":... }
]}
savevm.c void qmp_test_vmstates(bool has_times, int64_t times, · line 1295
Quoted 8 lines
savevm.c +8
-0+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.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [RFC PATCH v1 1/5] QEMUSizedBuffer/QEMUFile
In reply to Sanidhya KashyapQuoted 1 line · Sanidhya Kashyap
From: "Dr. David Alan Gilbert" <[email protected]>
You are attributing the patch to David...
Quoted 7 lines
Using the patch of Stefan Berger for memory buffer based QEMUFile.
http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html
In the words of David:
Quoted 8 lines
"""
Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers that can be written to or read from. """Signed-off-by Stefan Berger <[email protected]>Signed-off-by Joel Schopp <[email protected]>---
...but lack his S-o-b. Is it something that Stefan and Joel wrote (in which case, one of them should be listed as author), or something that David adopted and further improvedd (in which case he needs a signature)?
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [RFC PATCH v1 1/5] QEMUSizedBuffer/QEMUFile
Quoted 17 lines · * Eric Blake ([email protected]) wrote:
Quoted 1 line · Sanidhya Kashyap
From: "Dr. David Alan Gilbert" <[email protected]>
You are attributing the patch to David...
Quoted 12 lines
Using the patch of Stefan Berger for memory buffer based QEMUFile.
http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html
In the words of David:
"""
Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers that can be written to or read from. """
Quoted 7 lines
Quoted 3 lines
Signed-off-by Stefan Berger <[email protected]>Signed-off-by Joel Schopp <[email protected]>---
...but lack his S-o-b. Is it something that Stefan and Joel wrote (in which case, one of them should be listed as author), or something that David adopted and further improvedd (in which case he needs a signature)?
I adopted it and just updated it; nothing substantial.
(I use it in both my BER world and my postcopy world; and both Stefan and Isaku wrote something similar, so it's about time this finds it's way into the code base one way or another before someone else writes a 3rd implementation).
Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [Qemu-devel] [RFC PATCH v1 4/5] VMState test: set the frequency of the vmstate testing process
In reply to Eric Blake-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 16 lines
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": {}}
Quoted 7 lines
and a counterpart:
{"execute":"test-vmstates-get-tuning" } {"return": [ { "name":"sinterval", "type":"int", "value":100 }, { "name":"other", "type":"...", "value":... } ]}
Well, I have some issues about the implementation of the list which is associated with the set-tuning one. Any patch illustrating the above example which includes list will help me a lot.
Thanks.
- --
- -----
Sanidhya Kashyap
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJTyW6KAAoJEFt9RLmoahlnFQkIAJL6z0jo72gEc67ISr6pNxyH sxFbT67LNHhliWlVvohOPqC4e8hGOfXJb5gmPr2UFZUbVNKLrGc1Mh8t5OeRPR2y 3twA+3uUvpuJhc6F+KH4Z125Qirj7Uom9/PCtOYD9QMIAOEkD9SzD1S3ZpWL6I2r +l0s2xkFScG9eHyqe6pJlKRIORm9FnKVhYS18bzXz1WWh1mJTjF6qXNfbCS3OyqT 9rk1ZcYyYei/JNoclgC7Mvxy5QpQxrhhjwDFK0G3vFaPte+K+CYpGHL8a5s0sPFb OOZ29X+5Zz4wOx9btf0+LovqSwrLueHCdF/l65+jSNPRRsvB4MslQva/Rybs4Kg= =DpKh
-----END PGP SIGNATURE-----