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

Re: [Xen-devel] [PATCH RFC v2 2/7] xen/vNUMA: Per-domain vNUMA initialization.



On Fri, Sep 13, 2013 at 9:49 AM, Elena Ufimtseva <ufimtseva@xxxxxxxxx> wrote:
> Per-domain vNUMA topology initialization.

The one-line summary should have more hints about what code this
touches, so the right people notice it; for example:
  vNUMA: libxc plumbing to set guest vnodes

Also, you should cc the tools maintainers, Ian Campbell and Ian Jackson.

> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> index 3257e2a..8837fcc 100644
> --- a/tools/libxc/xc_domain.c
> +++ b/tools/libxc/xc_domain.c
> @@ -1629,6 +1629,63 @@ int xc_domain_set_virq_handler(xc_interface *xch, 
> uint32_t domid, int virq)
>      return do_domctl(xch, &domctl);
>  }
>
> +/* Informs XEN that domain is vNUMA aware */
> +int xc_domain_setvnodes(xc_interface *xch,
> +                        uint32_t domid,
> +                        uint16_t nr_vnodes,
> +                        uint16_t nr_vcpus,
> +                        vnuma_memblk_t *vmemblks,
> +                        unsigned int *vdistance,
> +                        unsigned int *vcpu_to_vnode,
> +                        unsigned int *vnode_to_pnode)
> +{
> +    int rc;
> +    DECLARE_DOMCTL;
> +    DECLARE_HYPERCALL_BOUNCE(vmemblks, sizeof(*vmemblks) * nr_vnodes,
> +                                    XC_HYPERCALL_BUFFER_BOUNCE_IN);
> +    DECLARE_HYPERCALL_BOUNCE(vdistance, sizeof(*vdistance) * nr_vnodes * 
> nr_vnodes,
> +                                    XC_HYPERCALL_BUFFER_BOUNCE_IN);
> +    DECLARE_HYPERCALL_BOUNCE(vcpu_to_vnode, sizeof(*vcpu_to_vnode) * 
> nr_vcpus,
> +                                    XC_HYPERCALL_BUFFER_BOUNCE_IN);
> +    DECLARE_HYPERCALL_BOUNCE(vnode_to_pnode, sizeof(*vnode_to_pnode) * 
> nr_vnodes,
> +                                    XC_HYPERCALL_BUFFER_BOUNCE_IN);
> +
> +    if ( vdistance == NULL || vcpu_to_vnode == NULL || vmemblks == NULL )
> +    /* vnode_to_pnode can be null on non-NUMA machines */
> +    {
> +            PERROR("Parameters are wrong XEN_DOMCTL_setvnumainfo\n");
> +            return -EINVAL;
> +    }
> +
> +    rc = -EINVAL;

You might as well be consistent here and set this above, and then do
"return rc" rather than "return -EINVAL".

 -George

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