[Libvir] [RFC][PATCH 1/2] Tested NUMA patches for available memory and topology

Richard W.M. Jones rjones at redhat.com
Fri Sep 28 09:56:08 UTC 2007


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?

[ 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.

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070928/7ffbd2e8/attachment-0001.bin>


More information about the libvir-list mailing list