From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 08 of 10 v3] libxl: enable automatic placement of guests on NUMA nodes Date: Fri, 6 Jul 2012 14:05:34 +0100 Message-ID: <4FF6E29E.3010006@eu.citrix.com> References: <7087d3622ee2051654c9.1341418687@Solace> <4FF6CC5C.1060905@eu.citrix.com> <1341579635.15708.17.camel@Abyss> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1341579635.15708.17.camel@Abyss> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Andre Przywara , Ian Campbell , Stefano Stabellini , Juergen Gross , Ian Jackson , "xen-devel@lists.xen.org" , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On 06/07/12 14:00, Dario Faggioli wrote: > On Fri, 2012-07-06 at 12:30 +0100, George Dunlap wrote: >> One question I have: Is there any particular reason to sort the whole >> list, rather than just finding the maximum based on the comparison function? >> > That is basically a leftover from my previous "let's make things a bit > more general" approach. Don't get me wrong, I still think that and like > sorting more than anything else for the interface (although it's an > "internal interface") but yes, right now looking for the max won't be > anything different from sorting descending and taking the #0 element. > >> But I think it's been a long time and it looks good enough to me: >> >> Acked-by: George Dunlap >> > Ok, I get this like I can leave it as it is... Or you want me to kill > the sorting? I can't really foresee a time when anyone would want to use anything other than the best option. Just choosing the best makes a slightly simpler interface, and simplified the code somewhat. At the moment, sorting shouldn't take too long, but suppose we get systems with 128 nodes at some point in the future -- then the number of possible combinations might be pretty large, and sorting that even at n log n might take a noticeable amount of time. So I think it's up to you: If you thinking sorting will be useful in the future, then I think keep it. But if you also think it's not going to be very useful, I think it would make more sense to take it out. -George