Re: [PATCH v2 4/7] virCaps: expose pages info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19.06.2014 13:08, Daniel P. Berrange wrote:
On Mon, Jun 16, 2014 at 05:08:27PM +0200, Michal Privoznik wrote:
There are two places where you'll find info on page sizes. The first
one is under <cpu/> element, where all supported pages sizes are
listed. Then the second one is under each <cell/> element which refers
to concrete NUMA node. At this place, the size of page's pool is
reported. So the capabilities XML looks something like this:

<capabilities>

   <host>
     <uuid>01281cda-f352-cb11-a9db-e905fe22010c</uuid>
     <cpu>
       <arch>x86_64</arch>
       <model>Westmere</model>
       <vendor>Intel</vendor>
       <topology sockets='1' cores='1' threads='1'/>
       ...
       <pages unit='KiB' size='4'/>
       <pages unit='KiB' size='2048'/>
       <pages unit='KiB' size='1048576'/>
     </cpu>
     ...
     <topology>
       <cells num='4'>
         <cell id='0'>
           <memory unit='KiB'>4054408</memory>
           <pages unit='KiB' size='4'>1013602</pages>
           <pages unit='KiB' size='2048'>3</pages>
           <pages unit='KiB' size='1048576'>1</pages>
           <distances/>
           <cpus num='1'>
             <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
           </cpus>
         </cell>
         <cell id='1'>
           <memory unit='KiB'>4071072</memory>
           <pages unit='KiB' size='4'>1017768</pages>
           <pages unit='KiB' size='2048'>3</pages>
           <pages unit='KiB' size='1048576'>1</pages>
           <distances/>
           <cpus num='1'>
             <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
           </cpus>
         </cell>
         ...
       </cells>
     </topology>
     ...
   </host>

   <guest/>

</capabilities>

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
  docs/schemas/capability.rng  | 21 +++++++++++++++++++++
  src/conf/capabilities.c      | 25 ++++++++++++++++++++++---
  src/conf/capabilities.h      | 15 ++++++++++++++-
  src/internal.h               | 12 ++++++++++++
  src/libxl/libxl_conf.c       |  1 +
  src/nodeinfo.c               | 40 +++++++++++++++++++++++++++++++++++++++-
  src/qemu/qemu_capabilities.c | 29 ++++++++++++++++++++++++++++-
  src/test/test_driver.c       |  2 +-
  src/xen/xend_internal.c      |  1 +
  tests/vircaps2xmltest.c      |  3 ++-
  tests/vircapstest.c          |  1 +
  11 files changed, 142 insertions(+), 8 deletions(-)

ACK  except


diff --git a/src/internal.h b/src/internal.h
index 0b36de9..a9e2065 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -256,6 +256,18 @@
              __FILE__, __LINE__);

  /**
+ * SWAP:
+ *
+ * In place exchange of two values
+ */
+# define SWAP(a, b)         \
+    do {                    \
+        (a) = (a) ^ (b);    \
+        (b) = (a) ^ (b);    \
+        (a) = (a) ^ (b);    \
+    } while (0)
+
+/**

this doesn't seem to be used anywhere. Either it belongs in a later
patch perhaps or can be dropped ?


ACK if you resolve that.

In fact this one is used in previous patch. I've moved it there.

Michal

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]