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.


Rich.



--
Elizabeth Kon (Beth)
IBM Linux Technology Center
Open Hypervisor Team
email: [EMAIL PROTECTED]

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to