From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 09 of 10 v3] libxl: have NUMA placement deal with cpupools Date: Fri, 6 Jul 2012 14:27:16 +0100 Message-ID: <4FF6E7B4.6070204@eu.citrix.com> References: <885e2f385601d6617905.1341418688@Solace> <4FF6DD1B.60106@eu.citrix.com> <1341580217.15708.27.camel@Abyss> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1341580217.15708.27.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:10, Dario Faggioli wrote: > On Fri, 2012-07-06 at 13:42 +0100, George Dunlap wrote: >>> libxl: have NUMA placement deal with cpupools >>> >>> In such a way that only the cpus belonging to the cpupool of the >>> domain being placed are considered for the placement itself. >>> >>> This happens by filtering out all the nodes in which the cpupool has >>> not any cpu from the placement candidates. After that -- as a cpu pooling >>> not necessarily happens at NUMA nodes boundaries -- we also make sure >>> only the actual cpus that are part of the pool are considered when >>> counting how much processors a placement candidate is able to provide. >>> >>> Signed-off-by: Dario Faggioli >>> Acked-by: Ian Campbell >> If I'm reading this right, the filtering won't prevent duplicate entries >> returned from get_numa_candidates; is that right? I.e., suppose you >> have a 4-node system and you run "xl cpupool-numa-split" to get one pool >> per node. Before this patch, your generator might return the following >> sets containing node 0: >> {0} >> {0,1} >> {0,2} >> {0,3} >> {0,1,2} >> {0,1,3} >> {0,1,2,3} >> {0,2,3} >> >> But now, if the domain is placed in a cpupool that has only numa node 0, >> it will return 8 copies of {0}. Is that correct? >> > It is. As the generation happens before cpupool are being considered at > all. Point is, while the number of cores could be quite high (and > continue to grow), the number of NUMA nodes in existing machines that > such a case won't hurt that much. Anyway, you're definitely right, it > would have been possible to do much better. > > Maybe, if we're cool with patch 8, we can jut skip this for now, and > I'll resubmit a separate patch (where I'll deal with duplicates) like > later or on Monday? Well, before discussing acking or nacking, I just wanted to establish that this is what the code did. The thing is, apart from re-writing your generator only to use nodes in the cpupool, the most efficient thing to get rid of duplicates is probably to do a sort anyway; so the end-to-end number of operations may end up similar either way. Why don't we do this: let's check in this version, so we can start getting the cpu placement stuff tested. Then if there's time, you can post patches to do the filtering at the node generation stage rather than the filtering stage. Does that make sense? -George