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

Re: [Xen-devel] [PATCH 2 of 4 v6/leftover] xl: inform libxl if there was a cpumap in the config file



Dario Faggioli writes ("[PATCH 2 of 4 v6/leftover] xl: inform libxl if there 
was a cpumap in the config file"):
> So that we attempt automatic placement only if that was not the case.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> 
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -215,6 +215,8 @@ int libxl__domain_build_info_setdefault(
>          libxl_bitmap_set_any(&b_info->cpumap);
>      }
>  
> +    libxl_defbool_setdefault(&b_info->numa_placement, true);
> +
>      if (b_info->max_memkb == LIBXL_MEMKB_DEFAULT)
>          b_info->max_memkb = 32 * 1024;
>      if (b_info->target_memkb == LIBXL_MEMKB_DEFAULT)
> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -212,7 +212,8 @@ int libxl__build_pre(libxl__gc *gc, uint
>       * call to libxl_set_vcpuaffinity_all() will do the actual placement,
>       * whatever that turns out to be.
>       */
> -    if (libxl_bitmap_is_full(&info->cpumap)) {
> +    if (libxl_defbool_val(info->numa_placement) &&
> +        libxl_bitmap_is_full(&info->cpumap)) {
>          int rc = numa_place_domain(gc, info);

Shouldn't this be

  -    if (libxl_bitmap_is_full(&info->cpumap)) {
  +    if (libxl_defbool_val(info->numa_placement)) {
  +        if (!libxl_bitmap_is_full(&info->cpumap)) {
  +            rc = ERROR_INVAL;
  +            LOG blah blah invalid not supported
  +            goto out;
  +        }

or the equivalent ?

Apart from that it looks good to me.

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