From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBsS-0006Zg-Bm for qemu-devel@nongnu.org; Tue, 12 Aug 2014 09:12:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHBsN-0006Ox-CG for qemu-devel@nongnu.org; Tue, 12 Aug 2014 09:12:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBsN-0006Ng-42 for qemu-devel@nongnu.org; Tue, 12 Aug 2014 09:12:31 -0400 Message-ID: <53EA12BC.5010302@redhat.com> Date: Tue, 12 Aug 2014 07:12:28 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406862751-24008-1-git-send-email-sanidhya.iiith@gmail.com> <1406862751-24008-3-git-send-email-sanidhya.iiith@gmail.com> In-Reply-To: <1406862751-24008-3-git-send-email-sanidhya.iiith@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0EFdIlBmuMu6r05UahckOFFhuMXkJ4Cwi" Subject: Re: [Qemu-devel] [PATCH v5 2/6] BitmapLog: bitmap dump code 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) --0EFdIlBmuMu6r05UahckOFFhuMXkJ4Cwi Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/31/2014 09:12 PM, Sanidhya Kashyap wrote: > In this patch, I have incorporated an enum named QemuProcess > which defines what kind of process is being executed i.e. > none --> no other process except the VM execution > migration --> migration is being executed > bitmap-dump --> bitmap dump process is undergoing >=20 > Besides this, I have tried to incorporate the dynamic change of > the last_ram_offset, if it gets change. The downside is that I am > holding lock for a longer period of time and I don't know whether > that should be done or not. I am also doing some allocation when > locked. > I am not sure whether last_ram_offset gets changed when a device > is hot plugged or hot unplugged. >=20 > I have modified the variables name as: > current-iteration: for the current iteration under process > iterations: total iterations that will be done which is constant > period: the delay in each iteration. >=20 > Signed-off-by: Sanidhya Kashyap > --- > hmp-commands.hx | 16 ++ > hmp.c | 18 +++ > hmp.h | 1 + > include/exec/cpu-all.h | 5 +- > include/sysemu/sysemu.h | 5 + > migration.c | 12 ++ > qapi-schema.json | 35 +++++ > qmp-commands.hx | 34 +++++ > savevm.c | 378 ++++++++++++++++++++++++++++++++++++++++= ++++++++ > vl.c | 24 +++ > 10 files changed, 527 insertions(+), 1 deletion(-) >=20 > +++ b/hmp-commands.hx > @@ -1788,6 +1788,22 @@ STEXI > show available trace events and their state > ETEXI > =20 > + { > + .name =3D "ldb|log_dirty_bitmap", The only other instances of a .name with an | are for giving a single-letter option name synonym to a long option, but ldb is not a single-letter option. I don't think you can create 'ldb' in the HMP interface. Just stick with the long name. > + .args_type =3D "filename:s,iterations:i?,period:i?", > + .params =3D "filename iterations period", > + .help =3D "dumps the memory's dirty bitmap to file\n\t\t= \t" > + "filename: name of the file in which the bitmap = will be saved\n\t\t\t" > + "iterations: number of times, the memory will be= logged\n\t\t\t" s/times,/times/ > +++ b/qapi-schema.json > @@ -3480,3 +3480,38 @@ > # Since: 2.1 > ## > { 'command': 'rtc-reset-reinjection' } > + > +## > +# QemuProcess I agree with David's advice to name this QemuBitmapUser. > +## > +# @log-dirty-bitmap > +# > +# This command will dump the dirty bitmap to a file by logging the > +# memory for a specified number of times with a defined time differenc= e > +# > +# @filename: name of the file in which the bitmap will be saved. > +# > +# @iterations: number of times the memory will be logged (optional). T= he > +# and max values are 3 and 100000 respectively. s/and/min and/ For consistency, the optional markup should look like: @iterations: #optional number of times the memory will be logged. Also, you should document what value is used when the option is omitted. > +# > +# @period: time difference in milliseconds between each iteration (opt= ional). > +# The min and max values are 10 and 100000 respectively. Again, wrong markup for #optional, and missing the default value. > +Arguments: > + > +- "filename": name of the file, in which the bitmap will be saved. > + > +- "iterations": number of times, the memory will be logged (optional).= > + The min and max values are 3 and 100000 respectively. > + > +- "period": time difference in milliseconds between each iteration (op= tional). > + The min and max values are 10 and 100000 respectively. > + [1] > +Examples: > +-> { "execute": "log-dirty-bitmap", > + "arguments": { > + "filename": "/tmp/fileXXX", > + "iterations": 3, > + "period": 10 } } > + > +<- { "return": {} } > =20 > +Note: The iterations, and period parameters are optional. iterations d= efault > +value is 3 while that of period is 10. This note is redundant, and it is not good to split information. Instead, drop the note paragraph, and mention the optional values of 3 and 10 up above at the point [1] where you mention the arguments are optional. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --0EFdIlBmuMu6r05UahckOFFhuMXkJ4Cwi 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 iQEcBAEBCAAGBQJT6hK8AAoJEKeha0olJ0NqtFwH/3ey1vNSUYMcDuagW9/xw1cp dwBEoSfQM0uX50bRptULGjSWaK+fSa5vz7b7I46E9Sl9d7qGhaVJPL9TBtKXABCM 0Y9U+UYWKaWlZyVfvKQO94F0aLb6WOGpdv5H21i51rAkyC2n3osofA2W3I2Dd6Gt G1V1rkJZcwa7Rp44TX6vZaGvbsB0M+8lkbRQYj/zgqqFm0izxUYcWeFMGQKamyui ndorIaInFt5V07tkNL0RxuXMBLRhbt4Y9Es52YnRlrRcfU8QWGg67t26NIOnH6MN bKu1yAfm5rENmDyfbndmxtKf25ME9UlrJIuVlFSVcyYCtILP3Pn8gh0sW7/Odto= =C15X -----END PGP SIGNATURE----- --0EFdIlBmuMu6r05UahckOFFhuMXkJ4Cwi--