From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwMaO-0002zQ-Fg for qemu-devel@nongnu.org; Tue, 31 Jul 2012 20:14:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwMaN-0004OD-6Q for qemu-devel@nongnu.org; Tue, 31 Jul 2012 20:14:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwMaM-0004NS-UL for qemu-devel@nongnu.org; Tue, 31 Jul 2012 20:14:47 -0400 Message-ID: <501874F2.3040109@redhat.com> Date: Tue, 31 Jul 2012 18:14:42 -0600 From: Eric Blake MIME-Version: 1.0 References: <201207312027.q6VKR8YE023009@int-mx02.intmail.prod.int.phx2.redhat.com> <87zk6f326e.fsf@codemonkey.ws> In-Reply-To: <87zk6f326e.fsf@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigB068B01A84CC4797DA64267B" Subject: Re: [Qemu-devel] [PATCH] memory: add cmd line option to omit guest memory from qmeu core dump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Jason Baron , mtosatti@redhat.com, avi@redhat.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB068B01A84CC4797DA64267B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07/31/2012 06:07 PM, Anthony Liguori wrote: > Jason Baron writes: >=20 >> Add a new '[,dump=3Don|off]' option to the '-m' memory option. When 'd= ump=3Doff' >> is specified, guest memory is omitted from the core dump. The default = behavior >> continues to be to include guest memory when a core dump is triggered.= In my >> testing, this brought the core dump size down from 384MB to 6 MB on a = 2GB guest. >> Thanks to Avi Kivity for the command line syntax. >> =20 >> DEF("m", HAS_ARG, QEMU_OPTION_m, >> - "-m megs set virtual RAM size to megs MB [default=3D" >> - stringify(DEFAULT_RAM_SIZE) "]\n", QEMU_ARCH_ALL) >> + "-m megs[,dump=3Don|off]\n" >> + " set virtual RAM size to megs MB [default=3D" str= ingify(DEFAULT_RAM_SIZE) "]\n" >> + " use 'dump=3Doff' to omit guest memory from a cor= e dump [default=3Don]\n", >> + QEMU_ARCH_ALL) > That said, I think this ought to be a -machine option. ram-size is > destined to become a machine option which would make -m N short hand fo= r > -machine ram-size=3Dn anyway. And hopefully whatever you decide on in 'qemu -help' won't break existing libvirt, while we move towards newer libvirt avoiding sensitivities to -help output. >=20 > Otherwise, the patch is nice. I really like MADV_DONTDUMP. We've had > similar requirements in the past and resorted to a really nasty core > dump parser. This is much more elegant. I'm now trying to figure out how beset to expose this functionality in libvirt XML. Tying it to -m might imply adding to the //domain/memory XPath element, while tying it to -machine might imply adding to //domain/on_crash or even to /domain/devices/emulator. Thinking a bit more, //domain/memory is a guest-visible attribute, but this new option is not (it's really more of a tweak on what to do at the emulator level, for when qemu crashes, with no impact to the guest itself). So I'm also in favor of tying it to -machine rather than -m, if possible (but libvirt will be able to adapt to whatever you settle on). --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigB068B01A84CC4797DA64267B 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQGHTyAAoJEKeha0olJ0NqoxAIAJrFqXEDVSXCj7zUl8ykOIep 8XohoeC3Dx4M4QYzuqhdjI/qOunyvXUTOTDsLlUGgMc0dOqVZ0du+CotNZWejQgi Ljr3D6rbsx0X2EzHss7NsehKM5mDoBl8zgoSyA818YXf46ueTdM3ek6gEt22Gc9+ q0lhbJ6fDnjlVr5rMn7rBKVpZCFr1Fzt5Q2PkLuwZ+9dZ3t8FZK2lZTQySR4xREr sX9IJsiVRlpdTUfAUYOboUh7q6fC//JaHKOAQmMxC8N/18VlcfRxOxcgzuPEghz1 V43XQVhpfQZo/BPZ9PGNsvUmXCpVzOkTk+tR5Xpv38pM6NIJKxJ6iqWHpI3FMZ0= =jRIu -----END PGP SIGNATURE----- --------------enigB068B01A84CC4797DA64267B--