From a0e0589e8d2014edba36d3678db2cdcb16f33289c9f3ba07e6ea0756baa26dc1 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Mon, 23 Jan 2012 21:46:39 +0000 Subject: [PATCH] - The xen kmp packages fail on the 09-check-packaged-twice script. Rename xen_pvdrivers.conf to xen_pvdrivers-.conf - bnc#739585 - L3: Xen block-attach fails after repeated attach/detach blktap-close-fifos.patch - bnc#741159 - Fix default setting of XENSTORED_ROOTDIR in xencommons init script xencommons-xenstored-root.patch - bnc#740625 - xen: cannot interact with xend after upgrade (SLES) - bnc#738694 - xen: cannot interact with xend after upgrade (os12.1) - Other README changes included. README.SuSE - bnc#694863 - kexec fails in xen 24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch - fate#310510 - fix xenpaging xenpaging.speedup-page-out.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=165 --- ...lag_to_xenstore_for_XS_RESET_WATCHES.patch | 45 ++++++++++ 32on64-extra-mem.patch | 2 +- README.SuSE | 16 +++- blktap-close-fifos.patch | 13 +++ blktap.patch | 2 +- change_home_server.patch | 2 +- kmp_filelist | 2 +- multi-xvdp.patch | 2 +- snapshot-xend.patch | 6 +- tmp-initscript-modprobe.patch | 2 +- xen-domUloader.diff | 6 +- xen.changes | 39 ++++++++ xen.spec | 15 +++- xenapi-console-protocol.patch | 2 +- xencommons-xenstored-root.patch | 19 ++++ xend-console-port-restore.patch | 4 +- xend-core-dump-loc.diff | 2 +- xend-domain-lock-sfex.patch | 8 +- xend-domain-lock.patch | 4 +- xend-migration-domname-fix.patch | 2 +- xend-sysconfig.patch | 25 ++---- xend-vcpu-affinity-fix.patch | 2 +- xenpaging.autostart.patch | 12 +-- xenpaging.speedup-page-out.patch | 89 +++++++++++++++++++ 24 files changed, 268 insertions(+), 53 deletions(-) create mode 100644 24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch create mode 100644 blktap-close-fifos.patch create mode 100644 xencommons-xenstored-root.patch create mode 100644 xenpaging.speedup-page-out.patch diff --git a/24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch b/24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch new file mode 100644 index 0000000..0406359 --- /dev/null +++ b/24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch @@ -0,0 +1,45 @@ +changeset: 24478:ef99b8571a6f +user: Olaf Hering +date: Thu Jan 05 19:40:40 2012 +0100 +files: tools/libxl/libxl_create.c tools/python/xen/xend/XendDomainInfo.py +description: +libxl: add feature flag to xenstore for XS_RESET_WATCHES + +Tell guest about availibilty of xenstoreds XS_RESET_WATCHES function. +Guests can not issue this command unconditionally because some buggy +toolstacks (such as EC2) do not ignore unknown commands properly. + +Signed-off-by: Olaf Hering +Committed-by: Ian Jackson +Acked-by: Ian Jackson + + +--- + tools/libxl/libxl_create.c | 1 + + tools/python/xen/xend/XendDomainInfo.py | 1 + + 2 files changed, 2 insertions(+) + +Index: xen-4.1.2-testing/tools/libxl/libxl_create.c +=================================================================== +--- xen-4.1.2-testing.orig/tools/libxl/libxl_create.c ++++ xen-4.1.2-testing/tools/libxl/libxl_create.c +@@ -382,6 +382,7 @@ retry_transaction: + libxl__xs_writev(&gc, t, libxl__sprintf(&gc, "%s/platform", dom_path), info->platformdata); + + xs_write(ctx->xsh, t, libxl__sprintf(&gc, "%s/control/platform-feature-multiprocessor-suspend", dom_path), "1", 1); ++ xs_write(ctx->xsh, t, libxl__sprintf(&gc, "%s/control/platform-feature-xs_reset_watches", dom_path), "1", 1); + if (!xs_transaction_end(ctx->xsh, t, 0)) { + if (errno == EAGAIN) { + t = 0; +Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +=================================================================== +--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -1770,6 +1770,7 @@ class XendDomainInfo: + f('store/port', self.store_port) + f('store/ring-ref', self.store_mfn) + ++ f('control/platform-feature-xs_reset_watches', True) + if arch.type == "x86": + f('control/platform-feature-multiprocessor-suspend', True) + diff --git a/32on64-extra-mem.patch b/32on64-extra-mem.patch index 6a38356..0b9d3c3 100644 --- a/32on64-extra-mem.patch +++ b/32on64-extra-mem.patch @@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2931,7 +2931,7 @@ class XendDomainInfo: +@@ -2932,7 +2932,7 @@ class XendDomainInfo: self.guest_bitsize = self.image.getBitSize() # Make sure there's enough RAM available for the domain diff --git a/README.SuSE b/README.SuSE index f161bbc..eefcc97 100644 --- a/README.SuSE +++ b/README.SuSE @@ -26,13 +26,13 @@ from YaST) check-mark the "Xen Virtual Machine Host Server" pattern. If, instead, you wish to install Xen manually later, click on the "Install Hypervisor and Tools" icon in YaST. -If you want to install and manage VMs graphically, be sure the following -optional packages are also installed: +If you want to install and manage VMs graphically, be sure to install a +graphical desktop environment like KDE or GNOME. The following optional +packages are needed to manage VMs graphically. Note that "Install Hypervisor +and Tools" installs all the packages below: vm-install (Optional, to install VMs) - python-gtk (Optional, to install VMs graphically) virt-manager (Optional, to manage VMs graphically) virt-viewer (Optional, to view VMs outside virt-manager) - tightvnc (Optional, to view VMs outside virt-manager) Additional packages: nbd-client (Optional, to access virtual disks stored on NBD servers) @@ -499,6 +499,14 @@ versions will be shipped with SUSE and via YaST Online Update. More frequent http://forge.novell.com/modules/xfmod/project/?xenpreview +Upgrading the Host Operating System +----------------------------------- +When upgrading the host operating system from one major release to another +(for example, SLES 10 to SLES 11 or openSUSE 11.4 to openSUSE 12.1) or when +applying a service pack like SLES 11 SP2 to SLES 11 SP1 all running VMs must +be shut down before the upgrade process is begun. + + Known Issues ------------ For a list of known issues and work-arounds, see diff --git a/blktap-close-fifos.patch b/blktap-close-fifos.patch new file mode 100644 index 0000000..98f99bb --- /dev/null +++ b/blktap-close-fifos.patch @@ -0,0 +1,13 @@ +Index: xen-4.1.2-testing/tools/blktap/drivers/blktapctrl.c +=================================================================== +--- xen-4.1.2-testing.orig/tools/blktap/drivers/blktapctrl.c ++++ xen-4.1.2-testing/tools/blktap/drivers/blktapctrl.c +@@ -280,7 +280,7 @@ static int del_disktype(blkif_t *blkif) + * qemu-dm instance. We may close the file handle only if there is + * no other disk left for this domain. + */ +- if (dtypes[type]->use_ioemu) ++ if (dtypes[type]->use_ioemu && dtypes[type]->idnum != DISK_TYPE_AIO) + return !qemu_instance_has_disks(blkif->tappid); + + /* Caller should close() if no single controller, or list is empty. */ diff --git a/blktap.patch b/blktap.patch index 327b20a..2cd7509 100644 --- a/blktap.patch +++ b/blktap.patch @@ -5,7 +5,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -3295,7 +3295,7 @@ class XendDomainInfo: +@@ -3296,7 +3296,7 @@ class XendDomainInfo: (fn, BOOTLOADER_LOOPBACK_DEVICE)) vbd = { diff --git a/change_home_server.patch b/change_home_server.patch index c761ee1..7bb7bcd 100644 --- a/change_home_server.patch +++ b/change_home_server.patch @@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -3131,6 +3131,11 @@ class XendDomainInfo: +@@ -3132,6 +3132,11 @@ class XendDomainInfo: self._cleanup_phantom_devs(paths) self._cleanupVm() diff --git a/kmp_filelist b/kmp_filelist index 150d88d..ede3343 100644 --- a/kmp_filelist +++ b/kmp_filelist @@ -1,3 +1,3 @@ %defattr (-,root,root) /lib/modules/%2-%1 -/etc/modprobe.d/xen_pvdrivers.conf +/etc/modprobe.d/xen_pvdrivers-%1.conf diff --git a/multi-xvdp.patch b/multi-xvdp.patch index 3d9379d..4d305b4 100644 --- a/multi-xvdp.patch +++ b/multi-xvdp.patch @@ -18,7 +18,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py xc = xen.lowlevel.xc.xc() xoptions = XendOptions.instance() -@@ -3300,33 +3300,38 @@ class XendDomainInfo: +@@ -3301,33 +3301,38 @@ class XendDomainInfo: # This is a file, not a device. pygrub can cope with a # file if it's raw, but if it's QCOW or other such formats # used through blktap, then we need to mount it first. diff --git a/snapshot-xend.patch b/snapshot-xend.patch index dc77ccd..fe767ce 100644 --- a/snapshot-xend.patch +++ b/snapshot-xend.patch @@ -699,7 +699,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py self._endRestore() except: log.exception('VM resume failed') -@@ -2370,7 +2368,7 @@ class XendDomainInfo: +@@ -2371,7 +2369,7 @@ class XendDomainInfo: return self.getDeviceController(deviceClass).reconfigureDevice( devid, devconfig) @@ -708,7 +708,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py """Create the devices for a vm. @raise: VmError for invalid devices -@@ -2419,7 +2417,7 @@ class XendDomainInfo: +@@ -2420,7 +2418,7 @@ class XendDomainInfo: if self.image: @@ -717,7 +717,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py #if have pass-through devs, need the virtual pci slots info from qemu self.pci_device_configure_boot() -@@ -3045,7 +3043,7 @@ class XendDomainInfo: +@@ -3046,7 +3044,7 @@ class XendDomainInfo: self._introduceDomain() self.image = image.create(self, self.info) if self.image: diff --git a/tmp-initscript-modprobe.patch b/tmp-initscript-modprobe.patch index 303215e..f47150b 100644 --- a/tmp-initscript-modprobe.patch +++ b/tmp-initscript-modprobe.patch @@ -22,4 +22,4 @@ Index: xen-4.1.2-testing/tools/hotplug/Linux/init.d/xencommons + if ! `xenstore-read -s / >/dev/null 2>&1` then - test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored" + test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="/var/lib/xenstored" diff --git a/xen-domUloader.diff b/xen-domUloader.diff index d7c0a76..eefcf4f 100644 --- a/xen-domUloader.diff +++ b/xen-domUloader.diff @@ -79,7 +79,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2332,6 +2332,10 @@ class XendDomainInfo: +@@ -2333,6 +2333,10 @@ class XendDomainInfo: deviceClass, config = self.info['devices'].get(dev_uuid) self._waitForDevice(deviceClass, config['devid']) @@ -90,7 +90,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py def _waitForDevice_destroy(self, deviceClass, devid, backpath): return self.getDeviceController(deviceClass).waitForDevice_destroy( devid, backpath) -@@ -3277,7 +3281,8 @@ class XendDomainInfo: +@@ -3278,7 +3282,8 @@ class XendDomainInfo: from xen.xend import XendDomain dom0 = XendDomain.instance().privilegedDomain() mounted_vbd_uuid = dom0.create_vbd(vbd, disk); @@ -100,7 +100,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py fn = BOOTLOADER_LOOPBACK_DEVICE try: -@@ -3287,10 +3292,10 @@ class XendDomainInfo: +@@ -3288,10 +3293,10 @@ class XendDomainInfo: if mounted: log.info("Unmounting %s from %s." % (fn, BOOTLOADER_LOOPBACK_DEVICE)) diff --git a/xen.changes b/xen.changes index 6b89b52..33cafc1 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Mon Jan 23 13:41:42 MST 2012 - carnold@novell.com + +- The xen kmp packages fail on the 09-check-packaged-twice script. + Rename xen_pvdrivers.conf to xen_pvdrivers-.conf + +------------------------------------------------------------------- +Wed Jan 18 09:42:54 MST 2012 - carnold@novell.com + +- bnc#739585 - L3: Xen block-attach fails after repeated attach/detach + blktap-close-fifos.patch + +------------------------------------------------------------------- +Fri Jan 13 10:37:53 MST 2012 - jfehlig@suse.com + +- bnc#741159 - Fix default setting of XENSTORED_ROOTDIR in + xencommons init script + xencommons-xenstored-root.patch + +------------------------------------------------------------------- +Thu Jan 12 06:49:57 MST 2012 - carnold@novell.com + +- bnc#740625 - xen: cannot interact with xend after upgrade (SLES) +- bnc#738694 - xen: cannot interact with xend after upgrade (os12.1) +- Other README changes included. + README.SuSE + +------------------------------------------------------------------- +Tue Jan 10 17:30:20 CET 2012 - ohering@suse.de + +- bnc#694863 - kexec fails in xen + 24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch + +------------------------------------------------------------------- +Mon Jan 9 16:10:19 CET 2012 - ohering@suse.de + +- fate#310510 - fix xenpaging + xenpaging.speedup-page-out.patch + ------------------------------------------------------------------- Tue Jan 3 08:26:42 MST 2012 - carnold@novell.com diff --git a/xen.spec b/xen.spec index 24643d6..585de0d 100644 --- a/xen.spec +++ b/xen.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: xen ExclusiveArch: %ix86 x86_64 %define xvers 4.1 @@ -98,7 +99,7 @@ BuildRequires: kernel-syms BuildRequires: module-init-tools BuildRequires: xorg-x11 %endif -Version: 4.1.2_11 +Version: 4.1.2_12 Release: 0 PreReq: %insserv_prereq %fillup_prereq Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) @@ -337,6 +338,7 @@ Patch24417: 24417-amd-erratum-573.patch Patch24429: 24429-mceinj-tool.patch Patch24447: 24447-x86-TXT-INIT-SIPI-delay.patch Patch24448: 24448-x86-pt-irq-leak.patch +Patch24478: 24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch # Upstream qemu patches Patch100: ioemu-9868-MSI-X.patch # Our patches @@ -397,6 +399,7 @@ Patch379: xend-migration-domname-fix.patch Patch380: xm-create-maxmem.patch # Sent upstream and tentatively ACK'ed, but not yet committed Patch381: 2XXXX-vif-bridge.patch +Patch382: xencommons-xenstored-root.patch # Patches for snapshot support Patch400: snapshot-ioemu-save.patch Patch401: snapshot-ioemu-restore.patch @@ -449,6 +452,7 @@ Patch459: xl-create-pv-with-qcow2-img.patch Patch460: ipxe-gcc45-warnings.patch Patch461: ipxe-ipv4-fragment.patch Patch462: ipxe-enable-nics.patch +Patch463: blktap-close-fifos.patch # Jim's domain lock patch Patch480: xend-domain-lock.patch Patch481: xend-domain-lock-sfex.patch @@ -483,6 +487,7 @@ Patch1107: xenpaging.evict_mmap_readonly.patch Patch1126: xenpaging.guest-memusage.patch Patch1129: xenpaging.autostart.patch Patch1130: xenpaging.doc.patch +Patch1131: xenpaging.speedup-page-out.patch Patch1142: xenpaging.qemu.flush-cache.patch # xenalyze Patch20000: xenalyze.gcc46.patch @@ -1012,6 +1017,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch24429 -p1 %patch24447 -p1 %patch24448 -p1 +%patch24478 -p1 # Qemu %patch100 -p1 # Our patches @@ -1070,6 +1076,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch379 -p1 %patch380 -p1 %patch381 -p1 +%patch382 -p1 %patch400 -p1 %patch401 -p1 %patch402 -p1 @@ -1119,6 +1126,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch460 -p1 %patch461 -p1 %patch462 -p1 +%patch463 -p1 %patch480 -p1 %patch481 -p1 %patch500 -p1 @@ -1151,6 +1159,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch1126 -p1 %patch1129 -p1 %patch1130 -p1 +%patch1131 -p1 %patch1142 -p1 # %patch99998 -p1 @@ -1257,12 +1266,12 @@ make -C tools/misc/serial-split install \ %if %{?with_kmp}0 export INSTALL_MOD_PATH=$RPM_BUILD_ROOT export INSTALL_MOD_DIR=updates +mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d for flavor in %flavors_to_build; do make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \ M=$PWD/obj/$flavor + install -m644 %SOURCE20 $RPM_BUILD_ROOT/etc/modprobe.d/xen_pvdrivers-$flavor.conf done -mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d -install -m644 %SOURCE20 $RPM_BUILD_ROOT/etc/modprobe.d/xen_pvdrivers.conf %endif %if %{?with_dom0_support}0 # Stubdom diff --git a/xenapi-console-protocol.patch b/xenapi-console-protocol.patch index 8b26de9..8ab158b 100644 --- a/xenapi-console-protocol.patch +++ b/xenapi-console-protocol.patch @@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -3934,6 +3934,14 @@ class XendDomainInfo: +@@ -3935,6 +3935,14 @@ class XendDomainInfo: if not config.has_key('backend'): config['backend'] = "00000000-0000-0000-0000-000000000000" diff --git a/xencommons-xenstored-root.patch b/xencommons-xenstored-root.patch new file mode 100644 index 0000000..68f3012 --- /dev/null +++ b/xencommons-xenstored-root.patch @@ -0,0 +1,19 @@ +Fix setting XENSTORED_ROOTDIR in xencommons + +Due to a logic bug, XENSTORED_ROOTDIR was not being set to +default value when zero length. + + Signed-off-by: Jim Fehlig +Index: xen-4.1.2-testing/tools/hotplug/Linux/init.d/xencommons +=================================================================== +--- xen-4.1.2-testing.orig/tools/hotplug/Linux/init.d/xencommons ++++ xen-4.1.2-testing/tools/hotplug/Linux/init.d/xencommons +@@ -47,7 +47,7 @@ do_start () { + + if ! `xenstore-read -s / >/dev/null 2>&1` + then +- test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored" ++ test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="/var/lib/xenstored" + rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null + test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log" + diff --git a/xend-console-port-restore.patch b/xend-console-port-restore.patch index 718ab74..29b5b73 100644 --- a/xend-console-port-restore.patch +++ b/xend-console-port-restore.patch @@ -21,7 +21,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -3054,7 +3054,7 @@ class XendDomainInfo: +@@ -3055,7 +3055,7 @@ class XendDomainInfo: # TODO: recategorise - called from XendCheckpoint # @@ -30,7 +30,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py log.debug("XendDomainInfo.completeRestore") -@@ -3065,6 +3065,7 @@ class XendDomainInfo: +@@ -3066,6 +3066,7 @@ class XendDomainInfo: self.image = image.create(self, self.info) if self.image: self._createDevices(True) diff --git a/xend-core-dump-loc.diff b/xend-core-dump-loc.diff index 9b38150..3aba1ec 100644 --- a/xend-core-dump-loc.diff +++ b/xend-core-dump-loc.diff @@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2303,7 +2303,7 @@ class XendDomainInfo: +@@ -2304,7 +2304,7 @@ class XendDomainInfo: # To prohibit directory traversal based_name = os.path.basename(self.info['name_label']) diff --git a/xend-domain-lock-sfex.patch b/xend-domain-lock-sfex.patch index 49b7c73..67fdbdb 100644 --- a/xend-domain-lock-sfex.patch +++ b/xend-domain-lock-sfex.patch @@ -223,7 +223,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -4518,8 +4518,14 @@ class XendDomainInfo: +@@ -4519,8 +4519,14 @@ class XendDomainInfo: # Return name of host contained in lock file. def get_lock_host(self, path): @@ -240,7 +240,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py hostname = "unknown" try: -@@ -4541,6 +4547,16 @@ class XendDomainInfo: +@@ -4542,6 +4548,16 @@ class XendDomainInfo: path = xoptions.get_xend_domain_lock_path() path = os.path.join(path, self.get_uuid()) @@ -257,7 +257,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py try: if not os.path.exists(path): mkdir.parents(path, stat.S_IRWXU) -@@ -4548,12 +4564,7 @@ class XendDomainInfo: +@@ -4549,12 +4565,7 @@ class XendDomainInfo: log.exception("%s could not be created." % path) raise XendError("%s could not be created." % path) @@ -271,7 +271,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py if status != 0: log.debug("Failed to aqcuire lock: status = %d" % status) raise XendError("The VM is locked and appears to be running on host %s." % self.get_lock_host(path)) -@@ -4570,12 +4581,18 @@ class XendDomainInfo: +@@ -4571,12 +4582,18 @@ class XendDomainInfo: path = xoptions.get_xend_domain_lock_path() path = os.path.join(path, self.get_uuid()) diff --git a/xend-domain-lock.patch b/xend-domain-lock.patch index e2f6c09..313ba85 100644 --- a/xend-domain-lock.patch +++ b/xend-domain-lock.patch @@ -257,7 +257,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py XendTask.log_progress(0, 30, self._constructDomain) XendTask.log_progress(31, 60, self._initDomain) -@@ -3002,6 +3003,11 @@ class XendDomainInfo: +@@ -3003,6 +3004,11 @@ class XendDomainInfo: self._stateSet(DOM_STATE_HALTED) self.domid = None # Do not push into _stateSet()! @@ -269,7 +269,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py finally: self.refresh_shutdown_lock.release() -@@ -4510,6 +4516,74 @@ class XendDomainInfo: +@@ -4511,6 +4517,74 @@ class XendDomainInfo: def has_device(self, dev_class, dev_uuid): return (dev_uuid in self.info['%s_refs' % dev_class.lower()]) diff --git a/xend-migration-domname-fix.patch b/xend-migration-domname-fix.patch index f765e47..4bcb2a1 100644 --- a/xend-migration-domname-fix.patch +++ b/xend-migration-domname-fix.patch @@ -8,7 +8,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1946,6 +1946,8 @@ class XendDomainInfo: +@@ -1947,6 +1947,8 @@ class XendDomainInfo: self.info['name_label'] = name if to_store: self.storeVm("name", name) diff --git a/xend-sysconfig.patch b/xend-sysconfig.patch index 65702f8..fae2e46 100644 --- a/xend-sysconfig.patch +++ b/xend-sysconfig.patch @@ -2,35 +2,28 @@ Index: xen-4.1.2-testing/tools/hotplug/Linux/init.d/sysconfig.xencommons =================================================================== --- xen-4.1.2-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xencommons +++ xen-4.1.2-testing/tools/hotplug/Linux/init.d/sysconfig.xencommons -@@ -1,11 +1,31 @@ +@@ -1,11 +1,24 @@ +## Path: System/Virtualization -+## Type: string(none,guest,hv,all) -+## Default: "" ++## Type: string ++## Default: "none" +# # Log xenconsoled messages (cf xl dmesg) #XENCONSOLED_TRACE=[none|guest|hv|all] -+XENCONSOLED_TRACE="" -+## Path: System/Virtualization -+## Type: string(yes,on,1) -+## Default: "" ++## Type: string ++## Default: Not defined, tracing off +# # Log xenstored messages #XENSTORED_TRACE=[yes|on|1] -+XENSTORED_TRACE="" -+## Path: System/Virtualization -+## Type: string("/var/lib/xenstored") -+## Default: "" ++## Type: string ++## Default: "/var/lib/xenstored" +# # Running xenstored on XENSTORED_ROOTDIR #XENSTORED_ROOTDIR=/var/lib/xenstored -+XENSTORED_ROOTDIR="" -+## Path: System/Virtualization -+## Type: string(yes,on,1) -+## Default: "" ++## Type: string ++## Default: Not defined, xenbackendd debug mode off +# # Running xenbackendd in debug mode #XENBACKENDD_DEBUG=[yes|on|1] -+XENBACKENDD_DEBUG="" diff --git a/xend-vcpu-affinity-fix.patch b/xend-vcpu-affinity-fix.patch index 3b57af0..e10b1ce 100644 --- a/xend-vcpu-affinity-fix.patch +++ b/xend-vcpu-affinity-fix.patch @@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2777,7 +2777,10 @@ class XendDomainInfo: +@@ -2778,7 +2778,10 @@ class XendDomainInfo: from xen.xend import XendDomain doms = XendDomain.instance().list('all') for dom in filter (lambda d: d.domid != self.domid, doms): diff --git a/xenpaging.autostart.patch b/xenpaging.autostart.patch index 58a6880..ae64f15 100644 --- a/xenpaging.autostart.patch +++ b/xenpaging.autostart.patch @@ -168,7 +168,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py def setMemoryTarget(self, target): """Set the memory target of this domain. @param target: In MiB. -@@ -2292,6 +2303,8 @@ class XendDomainInfo: +@@ -2293,6 +2304,8 @@ class XendDomainInfo: self.info['name_label'], self.domid, self.info['uuid'], new_name, new_uuid) self._unwatchVm() @@ -177,7 +177,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py self._releaseDevices() # Remove existing vm node in xenstore self._removeVm() -@@ -2966,6 +2979,9 @@ class XendDomainInfo: +@@ -2967,6 +2980,9 @@ class XendDomainInfo: self._createDevices() @@ -187,7 +187,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py self.image.cleanupTmpImages() self.info['start_time'] = time.time() -@@ -2990,6 +3006,8 @@ class XendDomainInfo: +@@ -2991,6 +3007,8 @@ class XendDomainInfo: self.refresh_shutdown_lock.acquire() try: self.unwatchShutdown() @@ -196,7 +196,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py self._releaseDevices() bootloader_tidy(self) -@@ -3074,6 +3092,7 @@ class XendDomainInfo: +@@ -3075,6 +3093,7 @@ class XendDomainInfo: self.image = image.create(self, self.info) if self.image: self._createDevices(True) @@ -204,7 +204,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py self.console_port = console_port self._storeDomDetails() self._registerWatches() -@@ -3215,6 +3234,8 @@ class XendDomainInfo: +@@ -3216,6 +3235,8 @@ class XendDomainInfo: # could also fetch a parsed note from xenstore fast = self.info.get_notes().get('SUSPEND_CANCEL') and 1 or 0 if not fast: @@ -213,7 +213,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py self._releaseDevices() self.testDeviceComplete() self.testvifsComplete() -@@ -3230,6 +3251,8 @@ class XendDomainInfo: +@@ -3231,6 +3252,8 @@ class XendDomainInfo: self._storeDomDetails() self._createDevices() diff --git a/xenpaging.speedup-page-out.patch b/xenpaging.speedup-page-out.patch new file mode 100644 index 0000000..b61a58c --- /dev/null +++ b/xenpaging.speedup-page-out.patch @@ -0,0 +1,89 @@ +xenpaging: no poll timeout while page-out is in progress + +The main loop calls xenpaging_wait_for_event_or_timeout() unconditionally +before doing any work. This function calls poll() with a timeout of 100ms. As +a result the page-out process is very slow due to the delay in poll(). + +Call poll() without timeout so that it returns immediately until the page-out +is done. Page-out is done when either the policy finds no more pages to +nominate or when the requested number of pages is reached. + +The condition is cleared when a watch event arrives, so that processing the +new target is not delayed once again by poll(). + +Signed-off-by: Olaf Hering + +--- + tools/xenpaging/policy_default.c | 1 + + tools/xenpaging/xenpaging.c | 12 +++++++++++- + tools/xenpaging/xenpaging.h | 1 + + 3 files changed, 13 insertions(+), 1 deletion(-) + +Index: xen-4.1.2-testing/tools/xenpaging/policy_default.c +=================================================================== +--- xen-4.1.2-testing.orig/tools/xenpaging/policy_default.c ++++ xen-4.1.2-testing/tools/xenpaging/policy_default.c +@@ -90,6 +90,7 @@ int policy_choose_victim(xenpaging_t *pa + /* Could not nominate any gfn */ + if ( wrap == current_gfn ) + { ++ paging->use_poll_timeout = 1; + /* Count wrap arounds */ + unconsumed_cleared++; + /* Force retry every few seconds (depends on poll() timeout) */ +Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c +=================================================================== +--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c ++++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c +@@ -85,6 +85,7 @@ static int xenpaging_wait_for_event_or_t + struct pollfd fd[2]; + int port; + int rc; ++ int timeout; + + /* Wait for event channel and xenstore */ + fd[0].fd = xc_evtchn_fd(xce); +@@ -92,7 +93,9 @@ static int xenpaging_wait_for_event_or_t + fd[1].fd = xs_fileno(paging->xs_handle); + fd[1].events = POLLIN | POLLERR; + +- rc = poll(fd, 2, 100); ++ /* No timeout while page-out is still in progress */ ++ timeout = paging->use_poll_timeout ? 100 : 0; ++ rc = poll(fd, 2, timeout); + if ( rc < 0 ) + { + if (errno == EINTR) +@@ -134,6 +137,8 @@ static int xenpaging_wait_for_event_or_t + if ( target_tot_pages < 0 || target_tot_pages > paging->max_pages ) + target_tot_pages = paging->max_pages; + paging->target_tot_pages = target_tot_pages; ++ /* Disable poll() delay while new target is not yet reached */ ++ paging->use_poll_timeout = 0; + DPRINTF("new target_tot_pages %d\n", target_tot_pages); + } + free(val); +@@ -1002,6 +1007,11 @@ int main(int argc, char *argv[]) + } + resume_pages(paging, num); + } ++ /* Now target was reached, enable poll() timeout */ ++ else ++ { ++ paging->use_poll_timeout = 1; ++ } + + } + DPRINTF("xenpaging got signal %d\n", interrupted); +Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.h +=================================================================== +--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.h ++++ xen-4.1.2-testing/tools/xenpaging/xenpaging.h +@@ -52,6 +52,7 @@ typedef struct xenpaging { + int num_paged_out; + int target_tot_pages; + int policy_mru_size; ++ int use_poll_timeout; + int debug; + unsigned long pagein_queue[XENPAGING_PAGEIN_QUEUE_SIZE]; + } xenpaging_t;