[libvirt] getFreeMemory reporting incorrectly?
Hany Fahim
hany.fahim at gmail.com
Thu Jun 11 18:37:57 UTC 2009
Thanks Daniel,
Is it fair to assume this fix may appear in the next release of libvirt?
Hany
On Thu, Jun 11, 2009 at 2:28 PM, Daniel P. Berrange <berrange at redhat.com>wrote:
> On Thu, Jun 11, 2009 at 02:13:17PM -0400, Hany Fahim wrote:
> > My apologies. Here it is:
> > Xen 3.3:
> >
> > [root at node1 ~]# xm info
> > total_memory : 3063
> > free_memory : 128
> > node_to_cpu : node0:0-1
> > node_to_memory : node0:128
> > xen_major : 3
> > xen_minor : 3
> > xen_extra : .1
>
> >
> > Xen 3.0.3:
> >
> > [root at node2 ~]# xm info
> > total_memory : 2046
> > free_memory : 256
> > node_to_cpu : node0:0
> > xen_major : 3
> > xen_minor : 1
> > xen_extra : .2-128.1.6.el5
>
>
> This shows that the Hypervisor is giving correct info back with both
> versions. So the problem must be at the libvirt space, and I believe
> I know what the problem is.
>
> The version of Xen in RHEL5 has
>
> struct xen_sysctl_availheap {
> /* IN variables. */
> uint32_t min_bitwidth; /* Smallest address width (zero if don't care).
> */
> uint32_t max_bitwidth; /* Largest address width (zero if don't care).
> */
> int32_t node; /* NUMA node of interest (-1 for all nodes). */
> /* OUT variables. */
> uint64_t avail_bytes; /* Bytes available in the specified region. */
> };
>
> While upstream Xen has
>
> struct xen_sysctl_availheap {
> /* IN variables. */
> uint32_t min_bitwidth; /* Smallest address width (zero if don't care).
> */
> uint32_t max_bitwidth; /* Largest address width (zero if don't care).
> */
> int32_t node; /* NUMA node of interest (-1 for all nodes). */
> /* OUT variables. */
> uint64_aligned_t avail_bytes;/* Bytes available in the specified region.
> */
> };
>
> Notice the 'avail_bytes' field is now aligned, so its 4 bytes further
> down from where libvirt is expecting it to be.
>
> We'll have to provide a fix in libvirt to use the new alignment for
> newer Xen.
>
> Regards,
> Daniel
> --
> |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/:|
> |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org:|
> |: http://autobuild.org -o- http://search.cpan.org/~danberr/:|
> |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505
> :|
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090611/d77f0bec/attachment-0001.htm>
More information about the libvir-list
mailing list