[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC v2][PATCH 1/3] docs: design and intended usage for NUMA-aware ballooning



On ven, 2013-08-16 at 10:09 +0100, Jan Beulich wrote:
> >>> On 16.08.13 at 06:13, Yechen Li <lccycc123@xxxxxxxxx> wrote:
> > +The biggest difference between current and NUMA-aware ballooning is that 
> > the
> > +latter needs to keep multiple lists of the ballooned pages in an array, 
> > with
> > +one element for each virtual node. This way, it is always evident, at any
> > +given time, what ballooned pages belong to what vnode.
> 
> That's wrong afaict: ballooned out pages aren't associated with any
> memory, and hence can't be associated with any vNID. Once they
> get re-populated, which vNID the memory belongs to is an attribute
> of the memory coming in, not the control structure that it's to be
> associated with.
> 
I may be wrong (I'm sorry, I had very few chance to look at the
ballooning code, and won't be able to do so for a while), but I think
what we want here is the other way around, i.e., having a way to make
sure that the memory that will come in will also end up --in the guest--
within a specific v-node.

I don't know if the only/best way to do this is the array of lists in
Yechen's patches, and I agree (as per the other e-mail) that this more
an implementation detail than anything else, but I think the point here
is: do we want to support that operational mode (again, perhaps not as
the default node, even in a virtual NUMA enabled guest) ?

> 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 <<node
the domain so far was "knowing" of>>, isn't it?

Or was it something different that you were asking?

Thanks and Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.