From: "Jan Beulich" Subject: Re: [RFC v2][PATCH 1/3] docs: design and intended usage for NUMA-aware ballooning Date: Mon, 19 Aug 2013 10:17:56 +0100 Message-ID: <5211F0D402000078000A07DB@nat28.tlf.novell.com> References: <1376626416-12901-1-git-send-email-lccycc123@gmail.com> <520E085A02000078000EC810@nat28.tlf.novell.com> <1376695852.2757.44.camel@Abyss> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VBLb7-0006eY-Vw for xen-devel@lists.xenproject.org; Mon, 19 Aug 2013 09:18:02 +0000 In-Reply-To: <1376695852.2757.44.camel@Abyss> Content-Disposition: inline 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@citrix.com Cc: Ian.Campbell@eu.citrix.com, xen-devel@lists.xenproject.org, Ian.Jackson@eu.citrix.com, ufimtseva@gmail.com, lccycc123@gmail.com List-Id: xen-devel@lists.xenproject.org >>>> Dario Faggioli 08/17/13 1:31 AM >>> >On ven, 2013-08-16 at 10:09 +0100, Jan Beulich wrote: >> I believe this thinking of yours stems from the fact that in Linux the >> page control structures are associated with nodes by way of the >> physical memory map being split into larger pieces, each coming from >> a particular node. But other OSes don't need to follow this model, >> and what you propose would also exclude extending the spanned >> nodes set if memory gets ballooned in that's not associated with >> any node the domain so far was "knowing" of. >> >I agree on the first part of this comment... Too much Linux-ism in the >description of what should be a generic model. > >The second part (the one about what happens if memory comes from an >"unknown" node), I'm not sure I get what you mean. > >Suppose we have guest G with 2 v-nodes and with pages in v-node 0 (say, >page 0,1,2..N-1) are backed by frames on p-node 2, while pages in v-node >1 (say, N,N+1,N+2..2N-1) are backed by frames on p-node 4, and that is >because, at creation time, either the user or the toolstack decided this >was the way to go. >So, if page 2 was ballooned down, when ballooning it up, we would like >to retain the fact that it is backed by a frame in p-node 2, and we >could ask Xen to try make that happen. On failure (e.g., no free frames >on p-node 2), we could either fail or have Xen allocate the memory >somewhere else, i.e., not on p-node 2 or p-node 4, and live with it >(i.e., map G's page 2 there), which I think is what you mean with <the domain so far was "knowing" of>>, isn't it? Right. Or the guest could choose to create a new node on the fly. Jan