direct-io.hg

view buildconfigs/mk.netbsd-2.0-xenU @ 7172:9c6b39746b78

Fix localhost live migration. We were overvigorously wiping out the store
entries when a domain closed and on save, which meant that the /vm entries
disappeared when a localhost migration occurred. XendCheckpoint has had extra
exception handling and logging added. It also now calls back through
XendDomain.restore_,which has the correct locking semantics to prevent race
conditions during migration.

Added assertions to XendCheckpoint to ensure that the channels are set after
XendDomainInfo.restore. I don't see why they would not be, and the old code
meant that in the case that they were not, IntroduceDomain would not be called
on the new domain, breaking Xend restart.

relocate calls through XendDomain.domain_restore_fd rather than directly to
XendCheckpoint to isolate XendCheckpoint from the rest of the world, and to
allow XendDomain to pass itself into XendCheckpoint for a callback.

Simplify the XendCheckpoint / XendDomainInfo interlock, giving only two
states, OK and TERMINATED. If XendCheckpoint asks for a suspend, but sees a
shutdown, it is valid for it to proceed -- either way the domain has stopped.
Higher level tools may wish to disallow this, but at the very least, there is
no sense in waiting for a suspend that will never come.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Tue Oct 04 11:14:50 2005 +0100 (2005-10-04)
parents bb2558cbc4f8
children
line source
2 OS = netbsd
4 NETBSD_RELEASE ?= 2.0
5 NETBSD_CVSSNAP ?= 20050309
7 EXTRAVERSION = xenU
9 FULLVERSION = $(NETBSD_VER)-$(EXTRAVERSION)
11 NETBSD_DIR = $(OS)-$(FULLVERSION)
13 .PHONY: build clean mrproper mkpatch
15 include buildconfigs/Rules.mk
17 build: $(OS)-$(EXTRAVERSION)
19 netbsd-%-tools.tar.bz2:
20 @echo "Cannot find netbsd-$(NETBSD_VER)-tools.tar.gz in path $(NETBSD_SRC_PATH)"
21 wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/netbsd-$*-tools.tar.bz2 -O./$@
23 netbsd-%-tools: netbsd-%-tools.tar.bz2
24 tar -jxf $<
25 touch $@ # update timestamp to avoid rebuild
27 $(NETBSD_DIR)/.valid: ref-$(OS)-$(NETBSD_VER)/.valid-ref
28 $(RM) -rf $(NETBSD_DIR)
29 cp -al $(<D) $(NETBSD_DIR)
30 # Apply arch-xen patches
31 ( cd netbsd-$(NETBSD_VER)-xen-sparse ; \
32 ./mkbuildtree ../$(NETBSD_DIR) )
33 @touch $(NETBSD_DIR)/.valid
35 # build the specified netbsd tree
36 netbsd-xen%: $(NETBSD_DIR)/.valid netbsd-$(NETBSD_RELEASE)-tools
37 $(MAKE) -C netbsd-$(FULLVERSION) config
38 $(MAKE) -C netbsd-$(FULLVERSION) netbsd
39 $(MAKE) -C netbsd-$(FULLVERSION) INSTALL_PATH=$(DESTDIR) INSTALL_NAME=boot/netbsd-$(NETBSD_VER)-xen$* install
41 clean::
42 $(MAKE) -C netbsd-$(FULLVERSION) clean
44 delete:
45 rm -rf tmp-$(OS)-$(NETBSD_VER) $(NETBSD_DIR)