WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 0 of 4] libxl: initial support for xenpaging
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Wed, 02 Nov 2011 15:45:36 +0100
Cc: George.Dunlap@xxxxxxxxxxxxx, Ian.Campbell@xxxxxxxxxx
Delivery-date: Wed, 02 Nov 2011 07:51:38 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1320245199; l=2812; s=domk; d=aepfle.de; h=Cc:To:From:Date:Subject:Content-Transfer-Encoding:MIME-Version: Content-Type:X-RZG-CLASS-ID:X-RZG-AUTH; bh=xNX4dghLowcvCgHT/1vJBK3KuFU=; b=CVG5+mPv1WMKS9nueKqHbsNvPVYFOd+D1y8Q0Ab/JW9iB2UXUc42EBZmTEfKi86kcOT Pfe2WHVjsMK/yviyg4Fq6Wq/WbUZAxHajdFhbVtQEgTYxWLVt7FKYtyR8cs+6/glLo/Ml 0BM9Xi45n/m5z1FZfrCxdyBbyBUlfcYkbJo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
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
http://lists.xensource.com/archives/html/xen-devel/2011-10/msg01542.html

libxl: make spawn interface more generic, sent on 2011-10-27
http://lists.xensource.com/archives/html/xen-devel/2011-10/msg01912.html


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:
  actmem=<int>
  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. 
http://lists.xensource.com/archives/html/xen-devel/2011-10/msg00110.html

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-*
commands:
'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".



Olaf


 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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel