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

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

The following series adds initial support for xenpaging to libxl.
It depends on two series I sent earlier:

tools/xenpaging fixes for xen-unstable, sent on 2011-10-21

libxl: make spawn interface more generic, sent on 2011-10-27

The logic of xenpaging was reversed by this series.
It does now monitor the guests tot_pages value and work toward that number by
either paging out more pages, or write pages back into the guest.
Target changes will received from the guests "memory/target-tot_pages" path.

Three new configuration file options specific for xenpaging were added:
  xenpaging_file=<string> (optional)
  xenpaging_extra=[ 'string', 'string' ] (optional)
xenpaging will only be started if actmem= is set and not zero.

A xl mem-SOMETHING command is not yet part of this series. I will add it once
a suitable name is found.

There has been some discussion regarding the naming of the config option, and
how to drive xenpaging via xl commands. 

The term "actual memory" was suggested by IanC, thats why the option is now
'actmem=' instead of 'totmem='. So far I couldnt come up with a better name
that follows the current scheme.

George Dunlap suggested the following off-list for the related xl mem-*
'xl mem-set' should continue to change the balloon target as it does today.
But it should also update "memory/target-tot_pages" with the same value. There
could be some churn when the balloon driver and xenpaging try to reach that
value. Eventually xenpaging will be faster to free pages, while the balloon
driver still tries to reach its target. In my opinion thats not an issue if
mem-set really means 'release as much memory back to Xen, as fast as
possible'. If the guest is actually using much memory then the balloon driver
(in its role as memory hog) can not do much to reach its target. But xenpaging
swap some parts of the guest to free memory on the host.

Two other 'xl mem-*' commands should be added to tweak just the balloon driver
and xenpaging. 'xl mem-balloon-target' does what 'mem-set' does today, and 'xl
mem-swap-target' will tweak "memory/target-tot_pages".


 tools/libxl/libxl.h          |    1 
 tools/libxl/libxl_create.c   |  126 ++++++++++++++++++++++++++
 tools/libxl/libxl_dom.c      |    8 +
 tools/libxl/libxl_memory.txt |   57 +++++++-----
 tools/libxl/libxl_types.idl  |    3 
 tools/libxl/xl_cmdimpl.c     |   31 ++++++
 tools/xenpaging/xenpaging.c  |  201 +++++++++++++++++++++++++++++++++++--------
 tools/xenpaging/xenpaging.h  |    1 
 8 files changed, 368 insertions(+), 60 deletions(-)

Xen-devel mailing list



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