From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: Empty memory nodes in VNUMA Date: Fri, 14 Aug 2015 11:38:43 -0400 Message-ID: <55CE0B83.4000208@oracle.com> References: <1439480480-20939-1-git-send-email-wei.liu2@citrix.com> <55CE0719.9000608@oracle.com> <20150814153543.GK978@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZQH53-0005iQ-US for xen-devel@lists.xenproject.org; Fri, 14 Aug 2015 15:39:42 +0000 In-Reply-To: <20150814153543.GK978@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Xen-devel , Dario Faggioli , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 08/14/2015 11:35 AM, Wei Liu wrote: > On Fri, Aug 14, 2015 at 11:19:53AM -0400, Boris Ostrovsky wrote: >> What is the purpose of 'nr_vmemranges < nr_vnodes' test in >> xc_domain_setvnuma()? Can't we have nodes with no memory? >> >> If that's the case, this check will still miss configurations when a node >> spans multiple memory ranges. >> >> For example, this fails: >> >> vcpus = 4 >> vnuma = [ [ "pnode=0","size=2048","vcpus=0-1" ], >> [ "pnode=1","size=1800" ], >> [ "pnode=2","size=0","vcpus=2-3" ], >> [ "pnode=3","size=100" ] ] >> >> but this >> >> vcpus = 4 >> vnuma = [ [ "pnode=0","size=2048","vcpus=0-1" ], >> [ "pnode=1","size=1801" ], >> [ "pnode=2","size=0","vcpus=2-3" ], >> [ "pnode=3","size=100" ] ] >> >> does not: because of MMIO hole this will cause a second 1MB range to be >> created on node 1 (in libxl__vnuma_build_vmemrange_hvm()). >> >> Can we drop this check? >> > I would say yes. There is certainly such hardware that some NUMA node > has 0 memory. > > Note that this function was written in the early day of vNUMA (4.5). I > think that function has the assumption that each vnode has one > vmemrange. > > Try removing that check and see what happens? I already did --- you think I'd ask without first trying? ;-) Yes, it works fine --- one a couple of tests that I tried. Do you want me to send a patch? -boris > > But, how far are you willing to go? Do you want system with no > vmemranges at all (that means, no memory at all)? If so that > nr_vmemranges == 0 check should also be removed. Just kidding... > > Wei. > >> -boris