[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 11/24] libxl: build, check and pass vNUMA info to Xen for PV guest
On Thu, 2015-02-12 at 19:44 +0000, Wei Liu wrote: > Transform the user supplied vNUMA configuration into libxl internal > representations, and finally libxc representations. Check validity of > the configuration along the line. > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx> > Cc: Elena Ufimtseva <ufimtseva@xxxxxxxxx> > Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > --- a/tools/libxl/libxl_dom.c > +++ b/tools/libxl/libxl_dom.c > +static int set_vnuma_info(libxl__gc *gc, uint32_t domid, > + const libxl_domain_build_info *info, > + const libxl__domain_build_state *state) > +{ > + int rc = 0; > + int i, nr_vdistance; > + unsigned int *vcpu_to_vnode, *vnode_to_pnode, *vdistance = NULL; > + > + vcpu_to_vnode = libxl__calloc(gc, info->max_vcpus, > + sizeof(unsigned int)); > + vnode_to_pnode = libxl__calloc(gc, info->num_vnuma_nodes, > + sizeof(unsigned int)); > + > + nr_vdistance = info->num_vnuma_nodes * info->num_vnuma_nodes; > + vdistance = libxl__calloc(gc, nr_vdistance, sizeof(unsigned int)); > + > + for (i = 0; i < info->num_vnuma_nodes; i++) { > + libxl_vnode_info *v = &info->vnuma_nodes[i]; > + int bit; > + > + /* vnode to pnode mapping */ > + vnode_to_pnode[i] = v->pnode; > + > + /* vcpu to vnode mapping */ > + libxl_for_each_set_bit(bit, v->vcpus) > + vcpu_to_vnode[bit] = i; > + 'bit' made the reader (or at least it made me) think that we're dealing with something that have to do with actual bits, while it's just an index, as usual. For that reason, I'd have gone for 'j' (as 'i' is being used already). However, that's certainly a minor thing, so with or without this change: Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Regards, Dario Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |