view arch/mips/boot/Makefile @ 897:329ea0ccb344

balloon: try harder to balloon up under memory pressure.

Currently if the balloon driver is unable to increase the guest's
reservation it assumes the failure was due to reaching its full
allocation, gives up on the ballooning operation and records the limit
it reached as the "hard limit". The driver will not try again until
the target is set again (even to the same value).

However it is possible that ballooning has in fact failed due to
memory pressure in the host and therefore it is desirable to keep
attempting to reach the target in case memory becomes available. The
most likely scenario is that some guests are ballooning down while
others are ballooning up and therefore there is temporary memory
pressure while things stabilise. You would not expect a well behaved
toolstack to ask a domain to balloon to more than its allocation nor
would you expect it to deliberately over-commit memory by setting
balloon targets which exceed the total host memory.

This patch drops the concept of a hard limit and causes the balloon
driver to retry increasing the reservation on a timer in the same
manner as when decreasing the reservation.

Also if we partially succeed in increasing the reservation
(i.e. receive less pages than we asked for) then we may as well keep
those pages rather than returning them to Xen.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 14:01:20 2009 +0100 (2009-06-05)
parents 831230e53067
line source
1 #
2 # This file is subject to the terms and conditions of the GNU General Public
3 # License. See the file "COPYING" in the main directory of this archive
4 # for more details.
5 #
6 # Copyright (C) 1995, 1998, 2001, 2002 by Ralf Baechle
7 # Copyright (C) 2004 Maciej W. Rozycki
8 #
10 #
11 # Some DECstations need all possible sections of an ECOFF executable
12 #
14 E2EFLAGS = -a
15 else
17 endif
19 #
20 # Drop some uninteresting sections in the kernel.
21 # This is only relevant for ELF kernels but doesn't hurt a.out
22 #
23 drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options
24 strip-flags = $(addprefix --remove-section=,$(drop-sections))
26 VMLINUX = vmlinux
28 all: vmlinux.ecoff vmlinux.srec addinitrd
30 vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX)
31 $(obj)/elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS)
33 $(obj)/elf2ecoff: $(obj)/elf2ecoff.c
34 $(HOSTCC) -o $@ $^
36 vmlinux.bin: $(VMLINUX)
37 $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin
39 vmlinux.srec: $(VMLINUX)
40 $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec
42 $(obj)/addinitrd: $(obj)/addinitrd.c
43 $(HOSTCC) -o $@ $^
45 archhelp:
46 @echo '* vmlinux.ecoff - ECOFF boot image'
47 @echo '* vmlinux.srec - SREC boot image'
49 clean-files += addinitrd \
50 elf2ecoff \
51 vmlinux.bin \
52 vmlinux.ecoff \
53 vmlinux.srec