view scripts/mksysmap @ 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 #!/bin/sh -x
2 # Based on the vmlinux file create the System.map file
3 # System.map is used by module-init tools and some debugging
4 # tools to retrieve the actual addresses of symbols in the kernel.
5 #
6 # Usage
7 # mksysmap vmlinux System.map
10 #####
11 # Generate System.map (actual filename passed as second argument)
13 # $NM produces the following output:
14 # f0081e80 T alloc_vfsmnt
16 # The second row specify the type of the symbol:
17 # A = Absolute
18 # B = Uninitialised data (.bss)
19 # C = Comon symbol
20 # D = Initialised data
21 # G = Initialised data for small objects
22 # I = Indirect reference to another symbol
23 # N = Debugging symbol
24 # R = Read only
25 # S = Uninitialised data for small objects
26 # T = Text code symbol
27 # U = Undefined symbol
28 # V = Weak symbol
29 # W = Weak symbol
30 # Corresponding small letters are local symbols
32 # For System.map filter away:
33 # a - local absolute symbols
34 # U - undefined global symbols
35 # w - local weak symbols
37 # readprofile starts reading symbols when _stext is found, and
38 # continue until it finds a symbol which is not either of 'T', 't',
39 # 'W' or 'w'. __crc_ are 'A' and placed in the middle
40 # so we just ignore them to let readprofile continue to work.
41 # (At least sparc64 has __crc_ in the middle).
43 $NM -n $1 | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2