From: Eric Blake <eblake@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Jason Baron <jbaron@redhat.com>,
mtosatti@redhat.com, avi@redhat.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH] memory: add cmd line option to omit guest memory from qmeu core dump
Date: Tue, 31 Jul 2012 18:14:42 -0600 [thread overview]
Message-ID: <501874F2.3040109@redhat.com> (raw)
In-Reply-To: <87zk6f326e.fsf@codemonkey.ws>
[-- Attachment #1: Type: text/plain, Size: 2193 bytes --]
On 07/31/2012 06:07 PM, Anthony Liguori wrote:
> Jason Baron <jbaron@redhat.com> writes:
>
>> Add a new '[,dump=on|off]' option to the '-m' memory option. When 'dump=off'
>> 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.
>>
>> DEF("m", HAS_ARG, QEMU_OPTION_m,
>> - "-m megs set virtual RAM size to megs MB [default="
>> - stringify(DEFAULT_RAM_SIZE) "]\n", QEMU_ARCH_ALL)
>> + "-m megs[,dump=on|off]\n"
>> + " set virtual RAM size to megs MB [default=" stringify(DEFAULT_RAM_SIZE) "]\n"
>> + " use 'dump=off' to omit guest memory from a core dump [default=on]\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 for
> -machine ram-size=n 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.
>
> 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).
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
next prev parent reply other threads:[~2012-08-01 0:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 20:27 [Qemu-devel] [PATCH] memory: add cmd line option to omit guest memory from qmeu core dump Jason Baron
2012-08-01 0:07 ` Anthony Liguori
2012-08-01 0:14 ` Eric Blake [this message]
2012-08-01 2:08 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501874F2.3040109@redhat.com \
--to=eblake@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=avi@redhat.com \
--cc=jbaron@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).