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

Re: [Xen-devel] [PATCH v2 16/16] libxl: automatic NUMA placement affects soft affinity



Dario Faggioli writes ("[PATCH v2 16/16] libxl: automatic NUMA placement 
affects soft affinity"):
> vCPU soft affinity and NUMA-aware scheduling does not have
> to be related. However, soft affinity is how NUMA-aware
> scheduling is actually implemented, and therefore, by default,
> the results of automatic NUMA placement (at VM creation time)
> are also used to set the soft affinity of all the vCPUs of
> the domain.
....
> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> index a1c16b0..d241efc 100644
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -222,21 +222,39 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
>       * some weird error manifests) the subsequent call to
>       * libxl_domain_set_nodeaffinity() will do the actual placement,
>       * whatever that turns out to be.
> +     *
> +     * As far as scheduling is concerned, we achieve NUMA-aware scheduling
> +     * by having the results of placement affect the soft affinity of all
> +     * the vcpus of the domain. Of course, we want that iff placement is
> +     * enabled and actually happens, so we only change info->cpumap_soft to
> +     * reflect the placement result if that is the case
>       */
>      if (libxl_defbool_val(info->numa_placement)) {

But isn't the default for this true ?

> -        if (!libxl_bitmap_is_full(&info->cpumap)) {
> +        /* We require both hard and soft affinity not to be set */
> +        if (!libxl_bitmap_is_full(&info->cpumap) ||
> +            !libxl_bitmap_is_full(&info->cpumap_soft)) {
>              LOG(ERROR, "Can run NUMA placement only if no vcpu "
> -                       "affinity is specified");
> +                       "(hard or soft) affinity is specified");
>              return ERROR_INVAL;

So the result will be that any attempt to set cpumaps in an
otherwise-naive config file will cause errors, rather than just
disabling the numa placement ?

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