[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 08 of 10 v2] libxl: enable automatic placement of guests on NUMA nodes
On Tue, 2012-06-26 at 17:25 +0100, Dario Faggioli wrote: > On Fri, 2012-06-22 at 11:14 +0100, Ian Campbell wrote: > > > > > + /* Bring the best candidate in front of the list --> > > > > > candidates[0] */ > > > > > + if (nr_candidates > 1) > > > > > + libxl__sort_numa_candidates(candidates, nr_candidates, > > > > > numa_cmpf); > > > > > > > > Is the start up cost of libxl__sort_numa_candidates significant enough > > > > to make that if worthwhile? > > > > > > > I'm not sure what you mean here, I'm afraid ... :-( > > > > Is the cost of sorting the 1 element list so high it is worth avoiding. > > Since the sort itself would be trivial the startup costs are what would > > dominate. > > > So, the answer is that I really don't know, as I'm using a library > function for doing the actual work. I really do not expect for them to > be that high, and I hence can remove the if() if you think it looks > ugly. :-) Not really ugly, it just seemed like an odd optimisation to make. > > > > > I'm not sure about this, if numa_place_domain fails for any reason would > > > > we be not better off logging and continuing without placement? We > > > > already do that explicitly in a couple of cases. > > > > > > > Well, actually, if it "fails" in the sense it finds no candidates or > > > does not manage in placing the domain, it returns 0, so we do right what > > > you're suggesting. I'm sure this is stated in some comment but I guess I > > > can repeat it here. If !rc, it means we stepped into some ERROR_FAIL or > > > something, which I think has to be handled like this, hasn't it? > > > > That makes sense. > > > > > Perhaps I can also add some logging about "successfully failing", i.e., > > > not getting into any error but not being able to place the domain. If > > > yes, that will happen _inside_ numa_place_domain() rather than here. > > > > Logging in that case seems wise in any case since it will have > > performance implications I think. > > > Ok, I'll log something out. > > Thanks and Regards, > Dario > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |