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

Re: [Xen-devel] [PATCH v10 5/9] libxl: vnuma types declararion



On Wed, 2014-09-03 at 00:24 -0400, Elena Ufimtseva wrote:
> Adds vnuma topology types declarations to libxl_domain_build_info
> structure.

Normally we would add the data types along with the implementation
rather than splitting it out like this.

Anyway, at some point in this series once everything is in place you
will need to introduce a LIBXL_HAVE_ define to indicate the availabilty
of this feature, (maybe this comes later)

> Signed-off-by: Elena Ufimtseva <ufimtseva@xxxxxxxxx>
> ---
>  tools/libxl/libxl_types.idl |    8 +++++++-
>  tools/libxl/libxl_vnuma.h   |   16 ++++++++++++++++
>  2 files changed, 23 insertions(+), 1 deletion(-)
>  create mode 100644 tools/libxl/libxl_vnuma.h
> 
> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> index 08a7927..ea8bac0 100644
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -333,7 +333,13 @@ libxl_domain_build_info = Struct("domain_build_info",[
>      ("disable_migrate", libxl_defbool),
>      ("cpuid",           libxl_cpuid_policy_list),
>      ("blkdev_start",    string),
> -    
> +    ("vnodes",          uint32),
> +    ("vmemranges",      uint32),
> +    ("vnuma_mem",       Array(uint64, "num_vnuma_mem")),
> +    ("vnuma_vcpumap",   Array(uint32, "num_vnuma_vcpumap")),
> +    ("vdistance",       Array(uint32, "num_vdistance")),
> +    ("vnuma_vnodemap",  Array(uint32, "num_vnuma_vnondemap")),
> +    ("vnuma_autoplacement",  libxl_defbool),
>      ("device_model_version", libxl_device_model_version),
>      ("device_model_stubdomain", libxl_defbool),
>      # if you set device_model you must set device_model_version too
> diff --git a/tools/libxl/libxl_vnuma.h b/tools/libxl/libxl_vnuma.h
> new file mode 100644
> index 0000000..4312070
> --- /dev/null
> +++ b/tools/libxl/libxl_vnuma.h
> @@ -0,0 +1,16 @@
> +#ifndef LIBXL_VNUMA_H
> +#define LIBXL_VNUMA_H
> +
> +#include "libxl_osdeps.h" /* must come before any other headers */
> +
> +#define VNUMA_NO_NODE ~((unsigned int)0)

Is this intended to be assigned to e.g. vnume_vnodemap? If so it should
probably have the same type (e.g. uint32_t).

> +
> +/*
> + * Min vNUMA node size in MBytes from Linux for x86 architecture.
> + * See linux source code arch/x86/include/asm/numa.h
> + */
> +#define MIN_VNODE_SIZE  (4)
> +
> +#define MAX_VNUMA_NODES ((unsigned int)1 << 10)

(unsigned int)1 is "1U" I think.

> +
> +#endif



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.