On Fri, Sep 28, 2007 at 06:42:10AM -0400, beth kon wrote: > Richard W.M. Jones wrote: > > >beth kon wrote: > > > >>Patch for accessing available memory. > > > > > >--- libvirt.danielpatch/src/driver.h 2007-09-11 15:29:43.000000000 > >-0400 > >+++ libvirt.cellsMemory/src/driver.h 2007-09-27 18:39:52.000000000 > >-0400 > >@@ -258,8 +258,9 @@ typedef virDriver *virDriverPtr; > > typedef int > > (*virDrvNodeGetCellsFreeMemory) > > (virConnectPtr conn, > >- unsigned long *freeMems, > >- int nbCells); > >+ long long *freeMems, > > > >This needs to be declared unsigned long long. If you configure with > >--enable-compile-warnings=error then the compiler will catch these > >sorts of errors. > > > >--- libvirt.danielpatch/src/xend_internal.c 2007-09-10 > >17:35:39.000000000 -0400 > >+++ libvirt.cellsMemory/src/xend_internal.c 2007-09-27 > >18:39:52.000000000 -0400 > >@@ -1954,6 +1954,8 @@ xenDaemonOpen(virConnectPtr conn, const > > { > > xmlURIPtr uri = NULL; > > int ret; > >+ > >+ virNodeInfo nodeInfo; > > > >This variable is never used. > > > >[ And from part 2/2 of the patch ] > > > >+ * getNumber: > > > >sscanf? > > The reason I created this is because I also wanted to find the length of > the segment so I could add it to the parsing offset to check what was > next in the string. That level of checking may be unnecessary > (overkill), and in any case could be more easily achieved using > something like sscanf for some token portion of the string. As I said, I > am *certain* there is a prettier way to do this! > > > > >[ And in general ] > > > >I compiled this version & was hoping to test it, but I don't seem to > >have the right combination of Xen to make it work. At least I don't > >see any <topology> section in the XML capabilities. What patches do I > >need for Xen to make this work? I have a 2 socket AMD machine which I > >assume should work with this. > > Daniel has built the kernel and xen rpms with the needed patches. People can fetch those (based on RHEL-5.1 rpms base) from http://veillard.com/NUMA/ the kernel-xen and xen(-devel) should be sufficient . Server is on my ADSL line please do not DoS it or I will be even slower than usual :-) Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list