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

Daniel P. Berrange berrange at redhat.com
Thu Jun 19 11:08:18 UTC 2014


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 at redhat.com>
> ---
>  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.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list