- bnc#674063 - drop xenpaging.autostart_delay.patch

avoid python excpetions due to intermediate xenstore and .sxp
  state caused by change of xenpaging variable from int to str

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=99
This commit is contained in:
James Fehlig 2011-02-24 18:24:39 +00:00 committed by Git OBS Bridge
parent 551c9a62bc
commit 44aa83066c
3 changed files with 63 additions and 144 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Feb 24 10:17:03 CET 2011 - ohering@suse.de
- bnc#674063 - drop xenpaging.autostart_delay.patch
avoid python excpetions due to intermediate xenstore and .sxp
state caused by change of xenpaging variable from int to str
-------------------------------------------------------------------
Fri Feb 11 16:25:51 MST 2011 - carnold@novell.com

115
xen.spec
View File

@ -1,5 +1,5 @@
#
# spec file for package xen (Version 4.0.2_02)
# spec file for package xen
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -26,37 +26,37 @@ ExclusiveArch: %ix86 x86_64
%define xen_build_dir xen-4.0.2-testing
%define with_kmp 1
%define with_stubdom 1
BuildRequires: LibVNCServer-devel
BuildRequires: SDL-devel
BuildRequires: automake
BuildRequires: bin86
BuildRequires: curl-devel
BuildRequires: dev86
BuildRequires: graphviz
BuildRequires: latex2html
BuildRequires: libjpeg-devel
BuildRequires: libxml2-devel
BuildRequires: ncurses-devel
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: pciutils-devel
BuildRequires: python-devel
BuildRequires: texinfo
BuildRequires: transfig
BuildRequires: libbz2-devel
BuildRequires: xz-devel
BuildRequires: LibVNCServer-devel
BuildRequires: SDL-devel
BuildRequires: automake
BuildRequires: bin86
BuildRequires: curl-devel
BuildRequires: dev86
BuildRequires: graphviz
BuildRequires: latex2html
BuildRequires: libjpeg-devel
BuildRequires: libxml2-devel
BuildRequires: ncurses-devel
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: pciutils-devel
BuildRequires: python-devel
BuildRequires: texinfo
BuildRequires: transfig
BuildRequires: libbz2-devel
BuildRequires: xz-devel
%if %suse_version <= 1110
BuildRequires: pmtools
BuildRequires: pmtools
%else
BuildRequires: acpica
BuildRequires: acpica
%endif
%if %suse_version >= 1030
BuildRequires: texlive
BuildRequires: texlive-latex
BuildRequires: texlive
BuildRequires: texlive-latex
%else
BuildRequires: te_ams
BuildRequires: te_latex
BuildRequires: tetex
BuildRequires: te_ams
BuildRequires: te_latex
BuildRequires: tetex
%endif
%ifarch x86_64
BuildRequires: glibc-32bit glibc-devel-32bit
@ -224,7 +224,7 @@ Patch373: usb-list.patch
Patch374: xend-devid-or-name.patch
Patch375: 22326-cpu-pools-numa-placement.patch
Patch376: 20158-revert.patch
Patch377: suspend_evtchn_lock.patch
Patch377: suspend_evtchn_lock.patch
# Patches for snapshot support
Patch400: snapshot-ioemu-save.patch
Patch401: snapshot-ioemu-restore.patch
@ -285,35 +285,34 @@ Patch700: hv_extid_compatibility.patch
# Build patch
Patch999: tmp_build.patch
# FATE 310510
Patch902: hotplug-block-losetup-a.patch
Patch10001: xenpaging.tools_xenpaging_cleanup.patch
Patch10002: xenpaging.pageout_policy.patch
Patch10003: xenpaging.get_paged_frame.patch
Patch10004: xenpaging.makefile.patch
Patch10010: xenpaging.policy_linear.patch
Patch10011: xenpaging.pagefile.patch
Patch10012: xenpaging.xenpaging_init.patch
Patch10013: xenpaging.mem_paging_tool_qemu_flush_cache.patch
Patch10014: xenpaging.machine_to_phys_mapping.patch
Patch10015: xenpaging.populate_only_if_paged.patch
Patch10017: xenpaging.autostart.patch
Patch10018: xenpaging.signal_handling.patch
Patch10019: xenpaging.MRU_SIZE.patch
Patch10020: xenpaging.guest_remove_page.patch
Patch10021: xenpaging.mem_event_check_ring-free_requests.patch
Patch10022: xenpaging.blacklist.patch
Patch10023: xenpaging.autostart_delay.patch
Patch10024: xenpaging.page_already_populated.patch
Patch10025: xenpaging.notify_policy_only_once.patch
Patch10026: xenpaging.num_pages_equal_max_pages.patch
Patch10027: xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch
Patch10028: xenpaging.HVMCOPY_gfn_paged_out.patch
Patch10029: xenpaging.optimize_p2m_mem_paging_populate.patch
Patch10030: xenpaging.paging_prep_enomem.patch
Patch10031: xenpaging.print-arguments.patch
Patch10032: xenpaging.no_domain_id.patch
Patch10033: xenpaging.runtime_mru_size.patch
Patch10040: xenpaging.doc.patch
Patch902: hotplug-block-losetup-a.patch
Patch10001: xenpaging.tools_xenpaging_cleanup.patch
Patch10002: xenpaging.pageout_policy.patch
Patch10003: xenpaging.get_paged_frame.patch
Patch10004: xenpaging.makefile.patch
Patch10010: xenpaging.policy_linear.patch
Patch10011: xenpaging.pagefile.patch
Patch10012: xenpaging.xenpaging_init.patch
Patch10013: xenpaging.mem_paging_tool_qemu_flush_cache.patch
Patch10014: xenpaging.machine_to_phys_mapping.patch
Patch10015: xenpaging.populate_only_if_paged.patch
Patch10017: xenpaging.autostart.patch
Patch10018: xenpaging.signal_handling.patch
Patch10019: xenpaging.MRU_SIZE.patch
Patch10020: xenpaging.guest_remove_page.patch
Patch10021: xenpaging.mem_event_check_ring-free_requests.patch
Patch10022: xenpaging.blacklist.patch
Patch10024: xenpaging.page_already_populated.patch
Patch10025: xenpaging.notify_policy_only_once.patch
Patch10026: xenpaging.num_pages_equal_max_pages.patch
Patch10027: xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch
Patch10028: xenpaging.HVMCOPY_gfn_paged_out.patch
Patch10029: xenpaging.optimize_p2m_mem_paging_populate.patch
Patch10030: xenpaging.paging_prep_enomem.patch
Patch10031: xenpaging.print-arguments.patch
Patch10032: xenpaging.no_domain_id.patch
Patch10033: xenpaging.runtime_mru_size.patch
Patch10040: xenpaging.doc.patch
Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
@ -827,7 +826,6 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
%patch10020 -p1
%patch10021 -p1
%patch10022 -p1
%patch10023 -p1
%patch10024 -p1
%patch10025 -p1
%patch10026 -p1
@ -840,7 +838,6 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
%patch10033 -p1
%patch10040 -p1
%build
XEN_EXTRAVERSION=%version-%release
XEN_EXTRAVERSION=${XEN_EXTRAVERSION#%{xvers}}

View File

@ -1,85 +0,0 @@
Subject: xenpaging: add dynamic startup delay for xenpaging
This is a debug helper. Since the xenpaging support is still fragile, run
xenpaging at different stages in the bootprocess. Different delays will trigger
more bugs. This implementation starts without delay for 5 reboots, then
increments the delay by 0.1 seconds It uses xenstore for presistant storage of
delay values
TODO: find the correct place to remove the xenstore directory when the guest is shutdown or crashed
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/python/xen/xend/image.py | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
Index: xen-4.0.2-testing/tools/python/xen/xend/image.py
===================================================================
--- xen-4.0.2-testing.orig/tools/python/xen/xend/image.py
+++ xen-4.0.2-testing/tools/python/xen/xend/image.py
@@ -123,6 +123,19 @@ class ImageHandler:
self.device_model = vmConfig['platform'].get('device_model')
self.xenpaging = vmConfig['platform'].get('xenpaging')
+ if self.xenpaging is not "0":
+ self.xenpaging_delay = xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay" % self.vm.info['name_label'])
+ if self.xenpaging_delay == None:
+ log.warn("XXX creating /local/domain/0/xenpaging/%s" % self.vm.info['name_label'])
+ xstransact.Mkdir("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'])
+ xstransact.Store("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'], ('xenpaging_delay', '0.0'))
+ xstransact.Store("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'], ('xenpaging_delay_inc', '0.1'))
+ xstransact.Store("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'], ('xenpaging_delay_use', '5'))
+ xstransact.Store("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'], ('xenpaging_delay_used', '0'))
+ self.xenpaging_delay = float(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay" % self.vm.info['name_label']))
+ self.xenpaging_delay_inc = float(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay_inc" % self.vm.info['name_label']))
+ self.xenpaging_delay_use = int(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay_use" % self.vm.info['name_label']))
+ self.xenpaging_delay_used = int(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay_used" % self.vm.info['name_label']))
self.display = vmConfig['platform'].get('display')
self.xauthority = vmConfig['platform'].get('xauthority')
@@ -399,6 +412,17 @@ class ImageHandler:
return
if self.xenpaging_pid:
return
+ if self.xenpaging_delay_used < self.xenpaging_delay_use:
+ self.xenpaging_delay_used += 1
+ else:
+ self.xenpaging_delay_used = 0
+ self.xenpaging_delay += self.xenpaging_delay_inc
+ log.info("delay_used %s" % self.xenpaging_delay_used)
+ log.info("delay_use %s" % self.xenpaging_delay_use)
+ log.info("delay %s" % self.xenpaging_delay)
+ log.info("delay_inc %s" % self.xenpaging_delay_inc)
+ xstransact.Store("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'], ('xenpaging_delay', self.xenpaging_delay))
+ xstransact.Store("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'], ('xenpaging_delay_used', self.xenpaging_delay_used))
xenpaging_bin = auxbin.pathTo("xenpaging")
args = [xenpaging_bin]
args = args + ([ "%d" % self.vm.getDomid()])
@@ -427,6 +451,9 @@ class ImageHandler:
except:
log.warn("chdir %s failed" % xenpaging_dir)
try:
+ if self.xenpaging_delay != 0.0:
+ log.info("delaying xenpaging startup %s seconds ..." % self.xenpaging_delay)
+ time.sleep(self.xenpaging_delay)
log.info("starting %s" % args)
os.execve(xenpaging_bin, args, env)
except Exception, e:
@@ -442,10 +469,16 @@ class ImageHandler:
self.xenpaging_pid = xenpaging_pid
os.close(null)
os.close(logfd)
+ if self.xenpaging_delay == 0.0:
+ log.warn("waiting for xenpaging ...")
+ time.sleep(22)
+ log.warn("waiting for xenpaging done.")
def destroyXenPaging(self):
if self.xenpaging == "0":
return
+ # FIXME find correct place for guest shutdown or crash
+ #xstransact.Remove("/local/domain/0/xenpaging/%s" % self.vm.info['name_label'])
if self.xenpaging_pid:
try:
os.kill(self.xenpaging_pid, signal.SIGHUP)