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

Re: [Xen-devel] [PATCH 4 of 4] xenpaging: initial libxl support



On Mon, Nov 21, 2011 at 3:13 PM, Olaf Hering <olaf@xxxxxxxxx> wrote:
> On Mon, Nov 21, Stefano Stabellini wrote:
>
>> what if tot_memkb is bigger than target_memkb? Or even bigger than
>> max_memkb?
>
> tot_memkb is unrelated to target_memkb, also somewhat unrelated to
> max_memkb.

It seems to me the opposite: tot_memkb (as you're describing here) and
target_memkb both mean, "How much Xen memory the administrator wants
allocated to the VM."  Before either paging or PoD, the only way to
modify the amount of memory allocated to a VM was via the balloon
driver.  PoD introduced a mechanism that allows the domain builder to
start a VM with less memory than static_max, and allow the VM to run
until balloon driver can normalize things.    Paging introduces a
separate mechanism for the administrator to modify the amount of
memory allocated to the VM.

It seems to me like paging and ballooning should both use
target_memkb.  We just need to figure out how to make sure that paging
only comes on when it's needed.  When it might be needed includes:
* For guests that don't have a balloon driver
* For guests whose balloon driver is not meeting target_memkb (either
because it's unresponsive, rebellious, or because it can't get more
memory from the guest OS)
* Potentially, between domain creation and the time the balloon driver
comes up (i.e., replacing PoD).

It seems like having some kind of a flag or setting would be better.
Various factors:
* Do we start the paging daemon?
* Do we use paging during boot?  Only matters if max_memkb !=
target_memkb.  If no, the domain builder uses PoD mode.  If yes, the
domain builder will fill in target_memkb worth of guest memory, and
then fill the rest with swapped-out entries.  (If max_memkb ==
target_memkb, domain builder fills in all entries.)
* When does the paging daemon respond to changes to target_memkb?
This could be:
 - Immediately (assume no balloon driver)
 - PoD mode: Start immediately, but when you notice the balloon driver
reaching the initial target_memkb, turn off, or switch into the next
mode
 - Fallback mode: Pay attention to changes in target_memkb, but don't
act immediately.  Wait for paging_delay secs for the balloon driver to
handle it; if it doesn't respond, then start paging (and perhaps
switch to "Immediately" mode).

What do you think?

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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