ia64/linux-2.6.18-xen.hg

view scripts/kconfig/images.c @ 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
children
line source
1 /*
2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
3 * Released under the terms of the GNU GPL v2.0.
4 */
6 static const char *xpm_load[] = {
7 "22 22 5 1",
8 ". c None",
9 "# c #000000",
10 "c c #838100",
11 "a c #ffff00",
12 "b c #ffffff",
13 "......................",
14 "......................",
15 "......................",
16 "............####....#.",
17 "...........#....##.##.",
18 "..................###.",
19 ".................####.",
20 ".####...........#####.",
21 "#abab##########.......",
22 "#babababababab#.......",
23 "#ababababababa#.......",
24 "#babababababab#.......",
25 "#ababab###############",
26 "#babab##cccccccccccc##",
27 "#abab##cccccccccccc##.",
28 "#bab##cccccccccccc##..",
29 "#ab##cccccccccccc##...",
30 "#b##cccccccccccc##....",
31 "###cccccccccccc##.....",
32 "##cccccccccccc##......",
33 "###############.......",
34 "......................"};
36 static const char *xpm_save[] = {
37 "22 22 5 1",
38 ". c None",
39 "# c #000000",
40 "a c #838100",
41 "b c #c5c2c5",
42 "c c #cdb6d5",
43 "......................",
44 ".####################.",
45 ".#aa#bbbbbbbbbbbb#bb#.",
46 ".#aa#bbbbbbbbbbbb#bb#.",
47 ".#aa#bbbbbbbbbcbb####.",
48 ".#aa#bbbccbbbbbbb#aa#.",
49 ".#aa#bbbccbbbbbbb#aa#.",
50 ".#aa#bbbbbbbbbbbb#aa#.",
51 ".#aa#bbbbbbbbbbbb#aa#.",
52 ".#aa#bbbbbbbbbbbb#aa#.",
53 ".#aa#bbbbbbbbbbbb#aa#.",
54 ".#aaa############aaa#.",
55 ".#aaaaaaaaaaaaaaaaaa#.",
56 ".#aaaaaaaaaaaaaaaaaa#.",
57 ".#aaa#############aa#.",
58 ".#aaa#########bbb#aa#.",
59 ".#aaa#########bbb#aa#.",
60 ".#aaa#########bbb#aa#.",
61 ".#aaa#########bbb#aa#.",
62 ".#aaa#########bbb#aa#.",
63 "..##################..",
64 "......................"};
66 static const char *xpm_back[] = {
67 "22 22 3 1",
68 ". c None",
69 "# c #000083",
70 "a c #838183",
71 "......................",
72 "......................",
73 "......................",
74 "......................",
75 "......................",
76 "...........######a....",
77 "..#......##########...",
78 "..##...####......##a..",
79 "..###.###.........##..",
80 "..######..........##..",
81 "..#####...........##..",
82 "..######..........##..",
83 "..#######.........##..",
84 "..########.......##a..",
85 "...............a###...",
86 "...............###....",
87 "......................",
88 "......................",
89 "......................",
90 "......................",
91 "......................",
92 "......................"};
94 static const char *xpm_tree_view[] = {
95 "22 22 2 1",
96 ". c None",
97 "# c #000000",
98 "......................",
99 "......................",
100 "......#...............",
101 "......#...............",
102 "......#...............",
103 "......#...............",
104 "......#...............",
105 "......########........",
106 "......#...............",
107 "......#...............",
108 "......#...............",
109 "......#...............",
110 "......#...............",
111 "......########........",
112 "......#...............",
113 "......#...............",
114 "......#...............",
115 "......#...............",
116 "......#...............",
117 "......########........",
118 "......................",
119 "......................"};
121 static const char *xpm_single_view[] = {
122 "22 22 2 1",
123 ". c None",
124 "# c #000000",
125 "......................",
126 "......................",
127 "..........#...........",
128 "..........#...........",
129 "..........#...........",
130 "..........#...........",
131 "..........#...........",
132 "..........#...........",
133 "..........#...........",
134 "..........#...........",
135 "..........#...........",
136 "..........#...........",
137 "..........#...........",
138 "..........#...........",
139 "..........#...........",
140 "..........#...........",
141 "..........#...........",
142 "..........#...........",
143 "..........#...........",
144 "..........#...........",
145 "......................",
146 "......................"};
148 static const char *xpm_split_view[] = {
149 "22 22 2 1",
150 ". c None",
151 "# c #000000",
152 "......................",
153 "......................",
154 "......#......#........",
155 "......#......#........",
156 "......#......#........",
157 "......#......#........",
158 "......#......#........",
159 "......#......#........",
160 "......#......#........",
161 "......#......#........",
162 "......#......#........",
163 "......#......#........",
164 "......#......#........",
165 "......#......#........",
166 "......#......#........",
167 "......#......#........",
168 "......#......#........",
169 "......#......#........",
170 "......#......#........",
171 "......#......#........",
172 "......................",
173 "......................"};
175 static const char *xpm_symbol_no[] = {
176 "12 12 2 1",
177 " c white",
178 ". c black",
179 " ",
180 " .......... ",
181 " . . ",
182 " . . ",
183 " . . ",
184 " . . ",
185 " . . ",
186 " . . ",
187 " . . ",
188 " . . ",
189 " .......... ",
190 " "};
192 static const char *xpm_symbol_mod[] = {
193 "12 12 2 1",
194 " c white",
195 ". c black",
196 " ",
197 " .......... ",
198 " . . ",
199 " . . ",
200 " . .. . ",
201 " . .... . ",
202 " . .... . ",
203 " . .. . ",
204 " . . ",
205 " . . ",
206 " .......... ",
207 " "};
209 static const char *xpm_symbol_yes[] = {
210 "12 12 2 1",
211 " c white",
212 ". c black",
213 " ",
214 " .......... ",
215 " . . ",
216 " . . ",
217 " . . . ",
218 " . .. . ",
219 " . . .. . ",
220 " . .... . ",
221 " . .. . ",
222 " . . ",
223 " .......... ",
224 " "};
226 static const char *xpm_choice_no[] = {
227 "12 12 2 1",
228 " c white",
229 ". c black",
230 " ",
231 " .... ",
232 " .. .. ",
233 " . . ",
234 " . . ",
235 " . . ",
236 " . . ",
237 " . . ",
238 " . . ",
239 " .. .. ",
240 " .... ",
241 " "};
243 static const char *xpm_choice_yes[] = {
244 "12 12 2 1",
245 " c white",
246 ". c black",
247 " ",
248 " .... ",
249 " .. .. ",
250 " . . ",
251 " . .. . ",
252 " . .... . ",
253 " . .... . ",
254 " . .. . ",
255 " . . ",
256 " .. .. ",
257 " .... ",
258 " "};
260 static const char *xpm_menu[] = {
261 "12 12 2 1",
262 " c white",
263 ". c black",
264 " ",
265 " .......... ",
266 " . . ",
267 " . .. . ",
268 " . .... . ",
269 " . ...... . ",
270 " . ...... . ",
271 " . .... . ",
272 " . .. . ",
273 " . . ",
274 " .......... ",
275 " "};
277 static const char *xpm_menu_inv[] = {
278 "12 12 2 1",
279 " c white",
280 ". c black",
281 " ",
282 " .......... ",
283 " .......... ",
284 " .. ...... ",
285 " .. .... ",
286 " .. .. ",
287 " .. .. ",
288 " .. .... ",
289 " .. ...... ",
290 " .......... ",
291 " .......... ",
292 " "};
294 static const char *xpm_menuback[] = {
295 "12 12 2 1",
296 " c white",
297 ". c black",
298 " ",
299 " .......... ",
300 " . . ",
301 " . .. . ",
302 " . .... . ",
303 " . ...... . ",
304 " . ...... . ",
305 " . .... . ",
306 " . .. . ",
307 " . . ",
308 " .......... ",
309 " "};
311 static const char *xpm_void[] = {
312 "12 12 2 1",
313 " c white",
314 ". c black",
315 " ",
316 " ",
317 " ",
318 " ",
319 " ",
320 " ",
321 " ",
322 " ",
323 " ",
324 " ",
325 " ",
326 " "};