view Documentation/arm/Booting @ 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 Booting ARM Linux
2 =================
4 Author: Russell King
5 Date : 18 May 2002
7 The following documentation is relevant to 2.4.18-rmk6 and beyond.
9 In order to boot ARM Linux, you require a boot loader, which is a small
10 program that runs before the main kernel. The boot loader is expected
11 to initialise various devices, and eventually call the Linux kernel,
12 passing information to the kernel.
14 Essentially, the boot loader should provide (as a minimum) the
15 following:
17 1. Setup and initialise the RAM.
18 2. Initialise one serial port.
19 3. Detect the machine type.
20 4. Setup the kernel tagged list.
21 5. Call the kernel image.
24 1. Setup and initialise RAM
25 ---------------------------
27 Existing boot loaders: MANDATORY
28 New boot loaders: MANDATORY
30 The boot loader is expected to find and initialise all RAM that the
31 kernel will use for volatile data storage in the system. It performs
32 this in a machine dependent manner. (It may use internal algorithms
33 to automatically locate and size all RAM, or it may use knowledge of
34 the RAM in the machine, or any other method the boot loader designer
35 sees fit.)
38 2. Initialise one serial port
39 -----------------------------
41 Existing boot loaders: OPTIONAL, RECOMMENDED
42 New boot loaders: OPTIONAL, RECOMMENDED
44 The boot loader should initialise and enable one serial port on the
45 target. This allows the kernel serial driver to automatically detect
46 which serial port it should use for the kernel console (generally
47 used for debugging purposes, or communication with the target.)
49 As an alternative, the boot loader can pass the relevant 'console='
50 option to the kernel via the tagged lists specifying the port, and
51 serial format options as described in
53 Documentation/kernel-parameters.txt.
56 3. Detect the machine type
57 --------------------------
59 Existing boot loaders: OPTIONAL
60 New boot loaders: MANDATORY
62 The boot loader should detect the machine type its running on by some
63 method. Whether this is a hard coded value or some algorithm that
64 looks at the connected hardware is beyond the scope of this document.
65 The boot loader must ultimately be able to provide a MACH_TYPE_xxx
66 value to the kernel. (see linux/arch/arm/tools/mach-types).
69 4. Setup the kernel tagged list
70 -------------------------------
72 Existing boot loaders: OPTIONAL, HIGHLY RECOMMENDED
73 New boot loaders: MANDATORY
75 The boot loader must create and initialise the kernel tagged list.
76 A valid tagged list starts with ATAG_CORE and ends with ATAG_NONE.
77 The ATAG_CORE tag may or may not be empty. An empty ATAG_CORE tag
78 has the size field set to '2' (0x00000002). The ATAG_NONE must set
79 the size field to zero.
81 Any number of tags can be placed in the list. It is undefined
82 whether a repeated tag appends to the information carried by the
83 previous tag, or whether it replaces the information in its
84 entirety; some tags behave as the former, others the latter.
86 The boot loader must pass at a minimum the size and location of
87 the system memory, and root filesystem location. Therefore, the
88 minimum tagged list should look:
90 +-----------+
91 base -> | ATAG_CORE | |
92 +-----------+ |
93 | ATAG_MEM | | increasing address
94 +-----------+ |
95 | ATAG_NONE | |
96 +-----------+ v
98 The tagged list should be stored in system RAM.
100 The tagged list must be placed in a region of memory where neither
101 the kernel decompressor nor initrd 'bootp' program will overwrite
102 it. The recommended placement is in the first 16KiB of RAM.
104 5. Calling the kernel image
105 ---------------------------
107 Existing boot loaders: MANDATORY
108 New boot loaders: MANDATORY
110 There are two options for calling the kernel zImage. If the zImage
111 is stored in flash, and is linked correctly to be run from flash,
112 then it is legal for the boot loader to call the zImage in flash
113 directly.
115 The zImage may also be placed in system RAM (at any location) and
116 called there. Note that the kernel uses 16K of RAM below the image
117 to store page tables. The recommended placement is 32KiB into RAM.
119 In either case, the following conditions must be met:
121 - Quiesce all DMA capable devices so that memory does not get
122 corrupted by bogus network packets or disk data. This will save
123 you many hours of debug.
125 - CPU register settings
126 r0 = 0,
127 r1 = machine type number discovered in (3) above.
128 r2 = physical address of tagged list in system RAM.
130 - CPU mode
131 All forms of interrupts must be disabled (IRQs and FIQs)
132 The CPU must be in SVC mode. (A special exception exists for Angel)
134 - Caches, MMUs
135 The MMU must be off.
136 Instruction cache may be on or off.
137 Data cache must be off.
139 - The boot loader is expected to call the kernel image by jumping
140 directly to the first instruction of the kernel image.