From: Wei Liu Subject: Re: [PATCH for-4.5] xen: vnuma: expose vnode_to_pnode to guest Date: Mon, 10 Nov 2014 12:07:53 +0000 Message-ID: <20141110120753.GC28360@zion.uk.xensource.com> References: <1415475807-8699-1-git-send-email-wei.liu2@citrix.com> <546091A40200007800045E86@mail.emea.novell.com> <20141110100016.GA17065@zion.uk.xensource.com> <1415616688.3717.16.camel@Abyss> <20141110110936.GA28360@zion.uk.xensource.com> <1415619727.3717.28.camel@Abyss> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1415619727.3717.28.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: Wei Liu , Jan Beulich , Elena Ufimtseva , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Nov 10, 2014 at 12:42:07PM +0100, Dario Faggioli wrote: > On Mon, 2014-11-10 at 11:09 +0000, Wei Liu wrote: > > On Mon, Nov 10, 2014 at 11:51:28AM +0100, Dario Faggioli wrote: > > > > > I'm 100% ok to re-start that discussion here and now... however, how > > > stable should this interface be? Can't we deal with this when actually > > > implementing NUMA aware ballooning and add stuff at than point, if > > > necessary? > > > > > The risk would be any new guests with extended get_vnumainfo interface > > won't be able to run on old hypervisor (4.5) without proper versioning. > > > Right. > > > So basically we have three choices: > > 1. Expose vnode_to_pnode in hypercall interface. > > 2. Expose the mapping in xenstore. > > 3. Don't expose anything, everything happens automagically without guest > > knowing anything. > > > > I'm fine with any of those three. However, Jan suggested in that one > > year old thread it would be wrong for the guest to know the mapping, so > > I think he implicitly voted for the third option. > > > Option 3 is the best IMO too. The guest, ideally, should know nothing > about how Xen mapped its virtual NUMA nodes onto the host RAM. > Agreed. I would go for this approach personally. > The question here is how effective that is. As of now, it's quite hard > to judge whether we'll be able to do everything automatically, I think. > I read your proposal, and it looks sensible, I'm just saying it's hard > to be conclusive at this stage. > I just checked the code. Unfortunately increase_reservation cannot cope with my proposal. Currently, the increase_reservation hypercall only allocates pages with no prior knowledge of what part of guest physical address space those pages will be added to. So for NUMA-aware ballooning, we might need a increase_reservation2 hypercall that does the trick I mentioned. Wei.