[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] memory: add cmd line option to omit guest memor

From: Eric Blake
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 07/31/2012 06:07 PM, Anthony Liguori wrote:
> Jason Baron <address@hidden> 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.

>> -    "-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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]