[libvirt] RFC: <memory units=...> [was: libvirt doesn't boot kVM, hangs, qemu on 100% CPU]

Christophe Fergeau cfergeau at redhat.com
Thu Feb 23 09:45:23 UTC 2012


On Wed, Feb 22, 2012 at 04:42:59PM -0700, Eric Blake wrote:
> There ain't no way on earth you're going to boot a kernel in 2 megabytes
> of memory!
> I propose enhancing the XML; on output, libvirt should produce:
> <memory units='k'>2048</memory> => 2048 * kibibyte
> the output unit must remain the same as it has always been, but the new
> attribute will make it easier for humans reading the XML to spot
> blunders like what spawned this thread.
> Thoughts before I propose such a patch?

For what it's worth, there are other places with unitless sizes, there's at
least <video vram=...>, everything under <memtune> and <bandwidth> (not
something measured in bytes though), and these 3 <pool> children:
<allocation>, <capacity> and <available>.
(NB: looked at your patches now and saw you handle memtune)

Also, <volume><allocation> and <volume><capacity> already
support a "unit" attribute which accept the K, M, G, T, P, E values
(xxxbyte), for consistency it would be better for the new <memory> attribute
to use "unit" and not "units" as suggested by Mathias, and for both "unit"
attributes to accept the same values.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120223/d20641e6/attachment-0001.sig>

More information about the libvir-list mailing list