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

Re: [Xen-devel] Proposed XENMEM_claim_pages hypercall: Analysis of problem and alternate solutions

On Thu, 2013-01-03 at 18:49 +0000, Dan Magenheimer wrote:
> > From: Andres Lagar-Cavilla [mailto:andreslc@xxxxxxxxxxxxxx]
> > On Jan 2, 2013, at 4:43 PM, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> 
> > wrote:
> > > I reject the omnisicient toolstack model as unimplementable [1]
> > > and, without it, I think you either do need a separate allocation/list,
> > > with all the issues that entails, or you need the proposed
> > > XENMEM_claim_pages hypercall to resolve memory allocation races
> > > (i.e. vs domain creation).
> > 
> > That pretty much ends the discussion. If you ask me below to reason within 
> > the constraints your
> > rejection places, then that's artificial reasoning. Your rejection seems to 
> > stem from philosophical
> > reasons, rather than technical limitations.
> Well, perhaps my statement is a bit heavy-handed, but I don't see
> how it ends the discussion... you simply need to prove my statement
> incorrect! ;-)  To me, that would mean pointing out any existing
> implementation or even university research that successfully
> predicts or externally infers future memory demand for guests.
> (That's a good approximation of my definition of an omniscient
> toolstack.)

I don't think a solution involving massaging of tot_pages need involve
either frequent changes to tot_pages nor omniscience from the tool

Start by separating the lifetime_maxmem from current_maxmem. The
lifetime_maxmem is internal to the toolstack (it is effectively your
tot_pages from today) and current_maxmem becomes whatever the toolstack
has actually pushed down into tot_pages at any given time.

In the normal steady state lifetime_maxmem == current_maxmem.

When you want to claim some memory in order to start a new domain of
size M you *temporarily* reduce current_maxmem for some set of domains
on the chosen host and arrange that the total of all the current_maxmems
on the host is such that "HOST_MEM - SUM(current_maxmems) > M".

Once the toolstack has built (or failed to build) the domain it can set
all the current_maxmems back to their lifetime_maxmem values.

If you want to build multiple domains in parallel then M just becomes
the sum over all the domains currently being built.


Xen-devel mailing list



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