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

Re: [Xen-devel] [PATCH v5 02/24] xen: make two memory hypercalls vNUMA-aware



On Fri, Feb 13, 2015 at 12:00:29PM +0000, Andrew Cooper wrote:
[...]
> > +static int translate_vnode_to_pnode(struct domain *d,
> > +                                    struct xen_memory_reservation *r,
> 
> const struct xen_memory_reservation *r
> 

Ack.

> > +                                    struct memop_args *a)
> > +{
> > +    int rc = 0;
> > +    unsigned int vnode, pnode;
> > +
> > +    if ( r->mem_flags & XENMEMF_vnode )
> > +    {
> > +        a->memflags &= ~MEMF_node(XENMEMF_get_node(r->mem_flags));
> > +        a->memflags &= ~MEMF_exact_node;
> 
> This interface feels semantically wrong, especially as the caller sets
> these fields first, just to have them dropped at this point.
> 
> A rather more appropriate function would be something along the lines of
> "construct_memop_from_reservation()" (name subject to improvement) which
> takes care completely filling 'a' from 'r', doing a v->p translation if
> needed.
> 

I'm fine with this. I'm going to use construct_memop_from_reservation if
no better alternative emerges.

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