File xenpaging.doc.patch of Package xen

---
 docs/misc/xenpaging.txt |   66 +++++++++++++++++++++++++++++-------------------
 1 file changed, 40 insertions(+), 26 deletions(-)

Index: xen-4.1.2-testing/docs/misc/xenpaging.txt
===================================================================
--- xen-4.1.2-testing.orig/docs/misc/xenpaging.txt
+++ xen-4.1.2-testing/docs/misc/xenpaging.txt
@@ -1,8 +1,6 @@
 Warning:
 
 The xenpaging code is new and not fully debugged.
-Usage of xenpaging can crash Xen or cause severe data corruption in the
-guest memory and its filesystems!
 
 Description:
 
@@ -14,34 +12,50 @@ than physically available on the host.
 
 Usage:
 
-Once the guest is running, run xenpaging with the guest_id and the
-number of pages to page-out:
+To enable xenpaging for a guest add the option 'actmem=' to the guests
+config file and run 'xm new <vm_config_file>' to make the changes
+active. actmem= takes the amount of memory in MB which a guest is
+allowed to use at a given time. Everything above this limit will be
+paged out. This paging is transparent to the guest.
+
+Example:
+ memory=4096
+ actmem=1024
+In this example a guest gets the impression it has 4GB of memory and
+the guest OS has to configure itself for this amount of memory. But
+xenpaging will page-out 3072MB, leaving only 1024MB active at a time.
+
+At runtime the configured value of actmem= can be changed with the "xm
+mem-swap-target" command.
+ xm mem-swap-target <domain_name> 512
+
+Additional cmdline options for the xenpaging binary can be specified
+with the xenpaging_extra= config file option:
+
+ xenpaging_extra=[ '-f', '/dev/shm/pagefile-guest_name', '-v' ]
+
+To get a list of available options, run /usr/lib/xen/bin/xenpaging -h:
+
+  xenpaging [options] -f <pagefile> -d <domain_id>
+
+options:
+ -d <domid>     --domain=<domid>         numerical domain_id of guest. This option is required.
+ -f <file>      --pagefile=<file>        pagefile to use. This option is required.
+ -m <max_memkb> --max_memkb=<max_memkb>  maximum amount of memory to handle.
+ -r <num>       --mru_size=<num>         number of paged-in pages to keep in memory.
+ -v             --verbose                enable debug output.
+ -h             --help                   this output.
+
+
+Caveats:
+Live migration with a paged guest does currently not work, the guest
+will crash once it starts on the target host. As a workaround stop
+paging before starting the migration:
 
-  chdir /var/lib/xen/xenpaging
-  xenpaging <guest_id>  <number_of_pages>
-
-To obtain the guest_id, run 'xm list'.
-xenpaging will write the pagefile to the current directory.
-Example with 128MB pagefile on guest 1:
-
-  xenpaging 1 32768
-
-Caution: stopping xenpaging manually will cause the guest to stall or
-crash because the paged-out memory is not written back into the guest!
-
-After a reboot of a guest, its guest_id changes, the current xenpaging
-binary has no target anymore. To automate restarting of xenpaging after
-guest reboot, specify the number if pages in the guest configuration
-file /etc/xen/vm/<guest_name>:
-
-xenpaging=32768
-
-Redo the guest with 'xm create /etc/xen/vm/<guest_name>' to activate the
-changes.
+xm mem-swap-target <dom_name> 0 && xm migrate -l <dom_name> <remote_host>
 
 
 Todo:
-- implement stopping of xenpaging
 - implement/test live migration
 
 
openSUSE Build Service is sponsored by