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

Re: [Xen-devel] [PATCH v9 6/9] libxl/xl: deprecate the build_info->cpumap field



On Wed, Jun 18, 2014 at 04:28:25PM +0200, Dario Faggioli wrote:
[...]
> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> index 484ad84..b22b41e 100644
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -250,7 +250,8 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
>       * whatever that turns out to be.
>       */
>      if (libxl_defbool_val(info->numa_placement)) {
> -        if (!libxl_bitmap_is_full(&info->cpumap)) {
> +        if (!libxl_bitmap_is_full(&info->cpumap) ||
> +            info->num_vcpu_hard_affinity) {

Not related to this patch, I'm wondering why you used
libxl_bitmap_is_full in the first place. (And I admit I missed this spot
when I wrote my patch, sorry)

>              LOG(ERROR, "Can run NUMA placement only if no vcpu "
>                         "affinity is specified");
>              return ERROR_INVAL;
> @@ -261,6 +262,13 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
>              return rc;
>      }
>      libxl_domain_set_nodeaffinity(ctx, domid, &info->nodemap);
> +    /*
> +     * info->cpumap is DEPRECATED, but we still want old applications
> +     * that may be using it to continue working.
> +     */
> +    if (!libxl_bitmap_is_full(&info->cpumap))
> +        LOG(WARN, "cpumap field of libxl_domain_build_info is DEPRECATED. "
> +                  "Please, use the vcpu_hard_affinity array instead");

Shouldn't it be !libxl_bitmap_is_empty?

Wei.

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