From: Wei Liu Subject: Re: [PATCH 3/4] libxc: rework vnuma bits in setup_guest Date: Tue, 19 May 2015 18:25:30 +0100 Message-ID: <20150519172530.GS26335@zion.uk.xensource.com> References: <1431963292-24765-1-git-send-email-wei.liu2@citrix.com> <1431963292-24765-4-git-send-email-wei.liu2@citrix.com> <555B636B.3080005@oracle.com> <20150519163151.GP26335@zion.uk.xensource.com> <555B6CFF.9060604@oracle.com> <20150519171427.GR26335@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20150519171427.GR26335@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: Boris Ostrovsky Cc: Ian Jackson , Dario Faggioli , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, May 19, 2015 at 06:14:27PM +0100, Wei Liu wrote: [...] > > >> > > >>Does having high memory mean that we need to have 2 vnodes? We should be > > >Yes, see the comment above. > > > > > >>able to cope with multiple vmemranges per node, right? > > > > > >Yes. That's already done in libxl's function to build hvm vmemranges. > > > > > >This is only a simple dummy layout so nothing fancy happens here. > > > > > > Right. But having multiple vnodes for a dummy topology looks to me a little > > counter-intuitive: people often assume that when number of nodes is 1 we > > don't have any NUMA-ness. Here we may need to look at vnode_to_pnode > > (possibly at both of the elements) to realize that this is a dummy layout. > > > > And given that this layout can be expressed with nr_vnodes=1 && > > nr_vmemranges=2 I am not sure what we gain by having two vnodes. > > > > Ah, so that's a bug: args->nr_vnodes++ should be deleted. > > We still only have one vnode (nid = 0). That vnode contains two > vmemranges. > And because no code in setup_guest uses that value so the bug doesn't affect the final guest layout. It will be fixed in version 2 nonetheless. Wei. > Wei. > > > -boris > > > > > > > >Wei. > > > > > >>-boris > > >> > > >> > > >>>+ } > > >>>+ > > >>>+ args->vmemranges = dummy_vmemrange; > > >>>+ args->vnode_to_pnode = dummy_vnode_to_pnode; > > >>> } > > >>>