[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 4/7] libxl: vNUMA supporting interface
On mar, 2013-11-26 at 17:14 -0500, Elena Ufimtseva wrote: > On Thu, Nov 21, 2013 at 4:59 AM, Li Yechen <lccycc123@xxxxxxxxx> wrote: > > Hi Elena and Dario, > >> + /* Determine the best nodes to fit vNUMA nodes */ > >> + /* TODO: change algorithm. The current just fits the nodes > >> + * Will be nice to have them also sorted by size > >> + * If no p-node found, will be set to NUMA_NO_NODE > >> + */ > >> + claim = calloc(info->nr_vnodes, sizeof(*claim)); > >> + if (claim == NULL) > >> + return rc; > >> + > >> + libxl_for_each_set_bit(n, info->nodemap) > >> + { > >> + for (i = 0; i < info->nr_vnodes; i++) > >> + { > >> + if (((claim[n] + (mems[i] << 20)) <= ninfo[n].free) && > >> + /*vnode was not set yet */ > >> + (info->vnode_to_pnode[i] == VNUMA_NO_NODE ) ) > >> + { > >> + info->vnode_to_pnode[i] = n; > >> + claim[n] += (mems[i] << 20); > >> + } > >> + } > >> + } > >> + > > > > So in the initial part, each vnode is set to EXACTLY ONE pnode, right? > > Hi Yechen > > Yes, one node or VNUMA_NO_NODE (any node); > Yes, but, at the same time, this particular chunk of code is most likely going to change, in order to better integrate with automatic NUMA placement. In fact, if I'm reading this right (as I said when reviewing this patch), this kind of try to compact more vnodes in the same pnode, if they fit. Although I see the reason why you ma want to do that, I'm still of the opinion that, if info->nodemap has some info coming from the placement algorithm, we should just honor them... That thing (the placement algorithm) is too complicated to just trow away the results! :-P I'm sorry I haven't got to write some code about this, I hope to find some time to do that soon enough. Thanks and Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) 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 |