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

Re: [Xen-devel] [PATCH v9 5/9] libxl/xl: push VCPU affinity pinning down to libxl



On Wed, 2014-06-18 at 16:28 +0200, Dario Faggioli wrote:
> From: Wei Liu <wei.liu2@xxxxxxxxxx>
> 
> This patch introduces an array of libxl_bitmap called "vcpu_hard_affinity"
> in libxl IDL to preserve VCPU to PCPU mapping. This is necessary for libxl
> to preserve all information to construct a domain.
> 
> Also define LIBXL_HAVE_BUILDINFO_VCPU_HARD_AFFINITY_ARRAY in libxl.h to
> mark the change in API.
> 
> This patch was originally part of Wei's series about pushing as much
> information as possible on domain configuration in libxl, rather than
> xl. See here, for more details:
>   http://lists.xen.org/archives/html/xen-devel/2014-06/msg01026.html
>   http://lists.xen.org/archives/html/xen-devel/2014-06/msg01031.html
> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>>
> ---
> Changes from v8:
>  * type in the changelog.
> 
> Changes from v7:
>  This patch is new in the series, and it is coming from Wei's series
>  about pushing domain config information down to libxl. It is being
>  incorporated in this series to reduce as much as possible the
>  inter-dependencies between the two patch series, i.e., for ease
>  of development and review.
> ---
>  tools/libxl/libxl.h         |   15 ++++++++++
>  tools/libxl/libxl_dom.c     |   14 +++++++++
>  tools/libxl/libxl_types.idl |    1 +
>  tools/libxl/xl_cmdimpl.c    |   65 
> ++++++++++++-------------------------------
>  4 files changed, 48 insertions(+), 47 deletions(-)
> 
> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> index c2b143b..663abe2 100644
> --- a/tools/libxl/libxl.h
> +++ b/tools/libxl/libxl.h
> @@ -338,6 +338,21 @@
>  #endif
>  
>  /*
> + * LIBXL_HAVE_BUILDINFO_VCPU_HARD_AFFINITY_ARRAY
> + *
> + * If this is defined, then libxl_domain_build_info structure will
> + * contain vcpu_hard_affinity, an array of libxl_bitmap that contains
> + * the necessary information to set the hard affinity of each VCPU to
> + * a set of PCPUs. Libxl will try to pin VCPUs to PCPUs according to
> + * this list.

Something needs to describe somewhere how this relates to the existing
cpumap field. I think they are sort of unioned (i.e. cpumap is applied
then this new thing can override it)?

Is that the most desirable semantics, it seems potentially confusing to
me. Perhaps cpumap should be ignored if this array is of non-zero size?

> + * The number of libxl_bitmap in the array equals to the maximum number
> + * of VCPUs. The size of each bitmap is computed basing on the maximum
> + * number of PCPUs.

These are all things which the caller is expect to arrange by making
appropriately sized allocations, not inherent properties of the API, I
think.

So "the number of libxl_bitmap in the array *should* be equal". "The
size of each bitmap should ..." etc.

Ian.


_______________________________________________
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®.