direct-io.hg

view buildconfigs/mk.linux-2.4-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 06d84bf87159
children
line source
2 OS = linux
4 LINUX_SERIES = 2.4
5 LINUX_VER = 2.4.30
7 EXTRAVERSION = xenU
9 LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
11 include buildconfigs/Rules.mk
13 .PHONY: build clean delete
15 # The real action starts here!
16 build: $(LINUX_DIR)/include/linux/autoconf.h
17 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
18 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
19 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
20 fi
21 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
23 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
24 rm -rf $(LINUX_DIR)
25 cp -al $(<D) $(LINUX_DIR)
26 # Apply arch-xen patches
27 ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
28 LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
29 # Re-use config from install dir if one exits else use default config
30 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
31 [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
32 cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
33 || cp $(LINUX_DIR)/arch/xen/defconfig-$(EXTRAVERSION) \
34 $(LINUX_DIR)/.config
35 # Patch kernel Makefile to set EXTRAVERSION
36 ( cd $(LINUX_DIR) ; \
37 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
38 rm -f Makefile ; mv Mk.tmp Makefile )
39 make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
40 make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
42 config: CONFIGMODE = menuconfig
43 config: $(LINUX_DIR)/include/linux/autoconf.h
44 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
45 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
47 clean::
48 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
50 delete:
51 rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)