ia64/linux-2.6.18-xen.hg

view arch/sparc64/kernel/ttable.S @ 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 /* ttable.S: Sparc V9 Trap Table(s) with SpitFire/Cheetah/SUN4V extensions.
2 *
3 * Copyright (C) 1996, 2001, 2006 David S. Miller (davem@davemloft.net)
4 */
7 .globl sparc64_ttable_tl0, sparc64_ttable_tl1
8 .globl tl0_icpe, tl1_icpe
9 .globl tl0_dcpe, tl1_dcpe
10 .globl tl0_fecc, tl1_fecc
11 .globl tl0_cee, tl1_cee
12 .globl tl0_iae, tl1_iae
13 .globl tl0_dae, tl1_dae
15 sparc64_ttable_tl0:
16 tl0_resv000: BOOT_KERNEL BTRAP(0x1) BTRAP(0x2) BTRAP(0x3)
17 tl0_resv004: BTRAP(0x4) BTRAP(0x5) BTRAP(0x6) BTRAP(0x7)
18 tl0_iax: membar #Sync
19 TRAP_NOSAVE_7INSNS(__spitfire_insn_access_exception)
20 tl0_itsb_4v: SUN4V_ITSB_MISS
21 tl0_iae: membar #Sync
22 TRAP_NOSAVE_7INSNS(__spitfire_access_error)
23 tl0_resv00b: BTRAP(0xb) BTRAP(0xc) BTRAP(0xd) BTRAP(0xe) BTRAP(0xf)
24 tl0_ill: membar #Sync
25 TRAP_7INSNS(do_illegal_instruction)
26 tl0_privop: TRAP(do_privop)
27 tl0_resv012: BTRAP(0x12) BTRAP(0x13) BTRAP(0x14) BTRAP(0x15) BTRAP(0x16) BTRAP(0x17)
28 tl0_resv018: BTRAP(0x18) BTRAP(0x19) BTRAP(0x1a) BTRAP(0x1b) BTRAP(0x1c) BTRAP(0x1d)
29 tl0_resv01e: BTRAP(0x1e) BTRAP(0x1f)
30 tl0_fpdis: TRAP_NOSAVE(do_fpdis)
31 tl0_fpieee: TRAP_SAVEFPU(do_fpieee)
32 tl0_fpother: TRAP_NOSAVE(do_fpother_check_fitos)
33 tl0_tof: TRAP(do_tof)
34 tl0_cwin: CLEAN_WINDOW
35 tl0_div0: TRAP(do_div0)
36 tl0_resv029: BTRAP(0x29) BTRAP(0x2a) BTRAP(0x2b) BTRAP(0x2c) BTRAP(0x2d) BTRAP(0x2e)
37 tl0_resv02f: BTRAP(0x2f)
38 tl0_dax: TRAP_NOSAVE(__spitfire_data_access_exception)
39 tl0_dtsb_4v: SUN4V_DTSB_MISS
40 tl0_dae: membar #Sync
41 TRAP_NOSAVE_7INSNS(__spitfire_access_error)
42 tl0_resv033: BTRAP(0x33)
43 tl0_mna: TRAP_NOSAVE(do_mna)
44 tl0_lddfmna: TRAP_NOSAVE(do_lddfmna)
45 tl0_stdfmna: TRAP_NOSAVE(do_stdfmna)
46 tl0_privact: TRAP_NOSAVE(__do_privact)
47 tl0_resv038: BTRAP(0x38) BTRAP(0x39) BTRAP(0x3a) BTRAP(0x3b) BTRAP(0x3c) BTRAP(0x3d)
48 tl0_resv03e: BTRAP(0x3e) BTRAP(0x3f) BTRAP(0x40)
49 #ifdef CONFIG_SMP
50 tl0_irq1: TRAP_IRQ(smp_call_function_client, 1)
51 tl0_irq2: TRAP_IRQ(smp_receive_signal_client, 2)
52 tl0_irq3: TRAP_IRQ(smp_penguin_jailcell, 3)
53 tl0_irq4: TRAP_IRQ(smp_new_mmu_context_version_client, 4)
54 #else
55 tl0_irq1: BTRAP(0x41)
56 tl0_irq2: BTRAP(0x42)
57 tl0_irq3: BTRAP(0x43)
58 tl0_irq4: BTRAP(0x44)
59 #endif
60 tl0_irq5: TRAP_IRQ(handler_irq, 5)
61 tl0_irq6: BTRAP(0x46) BTRAP(0x47) BTRAP(0x48) BTRAP(0x49)
62 tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d)
63 #ifndef CONFIG_SMP
64 tl0_irq14: TRAP_IRQ(timer_irq, 14)
65 #else
66 tl0_irq14: TICK_SMP_IRQ
67 #endif
68 tl0_irq15: TRAP_IRQ(handler_irq, 15)
69 tl0_resv050: BTRAP(0x50) BTRAP(0x51) BTRAP(0x52) BTRAP(0x53) BTRAP(0x54) BTRAP(0x55)
70 tl0_resv056: BTRAP(0x56) BTRAP(0x57) BTRAP(0x58) BTRAP(0x59) BTRAP(0x5a) BTRAP(0x5b)
71 tl0_resv05c: BTRAP(0x5c) BTRAP(0x5d) BTRAP(0x5e) BTRAP(0x5f)
72 tl0_ivec: TRAP_IVEC
73 tl0_paw: TRAP(do_paw)
74 tl0_vaw: TRAP(do_vaw)
75 tl0_cee: membar #Sync
76 TRAP_NOSAVE_7INSNS(__spitfire_cee_trap)
77 tl0_iamiss:
78 #include "itlb_miss.S"
79 tl0_damiss:
80 #include "dtlb_miss.S"
81 tl0_daprot:
82 #include "dtlb_prot.S"
83 tl0_fecc: BTRAP(0x70) /* Fast-ECC on Cheetah */
84 tl0_dcpe: BTRAP(0x71) /* D-cache Parity Error on Cheetah+ */
85 tl0_icpe: BTRAP(0x72) /* I-cache Parity Error on Cheetah+ */
86 tl0_resv073: BTRAP(0x73) BTRAP(0x74) BTRAP(0x75)
87 tl0_resv076: BTRAP(0x76) BTRAP(0x77) BTRAP(0x78) BTRAP(0x79) BTRAP(0x7a) BTRAP(0x7b)
88 tl0_cpu_mondo: TRAP_NOSAVE(sun4v_cpu_mondo)
89 tl0_dev_mondo: TRAP_NOSAVE(sun4v_dev_mondo)
90 tl0_res_mondo: TRAP_NOSAVE(sun4v_res_mondo)
91 tl0_nres_mondo: TRAP_NOSAVE(sun4v_nonres_mondo)
92 tl0_s0n: SPILL_0_NORMAL
93 tl0_s1n: SPILL_1_NORMAL
94 tl0_s2n: SPILL_2_NORMAL
95 tl0_s3n: SPILL_0_NORMAL_ETRAP
96 tl0_s4n: SPILL_1_GENERIC_ETRAP
97 tl0_s5n: SPILL_1_GENERIC_ETRAP_FIXUP
98 tl0_s6n: SPILL_2_GENERIC_ETRAP
99 tl0_s7n: SPILL_2_GENERIC_ETRAP_FIXUP
100 tl0_s0o: SPILL_0_OTHER
101 tl0_s1o: SPILL_1_OTHER
102 tl0_s2o: SPILL_2_OTHER
103 tl0_s3o: SPILL_3_OTHER
104 tl0_s4o: SPILL_4_OTHER
105 tl0_s5o: SPILL_5_OTHER
106 tl0_s6o: SPILL_6_OTHER
107 tl0_s7o: SPILL_7_OTHER
108 tl0_f0n: FILL_0_NORMAL
109 tl0_f1n: FILL_1_NORMAL
110 tl0_f2n: FILL_2_NORMAL
111 tl0_f3n: FILL_3_NORMAL
112 tl0_f4n: FILL_4_NORMAL
113 tl0_f5n: FILL_0_NORMAL_RTRAP
114 tl0_f6n: FILL_1_GENERIC_RTRAP
115 tl0_f7n: FILL_2_GENERIC_RTRAP
116 tl0_f0o: FILL_0_OTHER
117 tl0_f1o: FILL_1_OTHER
118 tl0_f2o: FILL_2_OTHER
119 tl0_f3o: FILL_3_OTHER
120 tl0_f4o: FILL_4_OTHER
121 tl0_f5o: FILL_5_OTHER
122 tl0_f6o: FILL_6_OTHER
123 tl0_f7o: FILL_7_OTHER
124 tl0_sunos: SUNOS_SYSCALL_TRAP
125 tl0_bkpt: BREAKPOINT_TRAP
126 tl0_divz: TRAP(do_div0)
127 tl0_flushw: FLUSH_WINDOW_TRAP
128 tl0_resv104: BTRAP(0x104) BTRAP(0x105) BTRAP(0x106) BTRAP(0x107)
129 .globl tl0_solaris
130 tl0_solaris: SOLARIS_SYSCALL_TRAP
131 tl0_resv109: BTRAP(0x109)
132 tl0_resv10a: BTRAP(0x10a) BTRAP(0x10b) BTRAP(0x10c) BTRAP(0x10d) BTRAP(0x10e)
133 tl0_resv10f: BTRAP(0x10f)
134 tl0_linux32: LINUX_32BIT_SYSCALL_TRAP
135 tl0_oldlinux64: LINUX_64BIT_SYSCALL_TRAP
136 tl0_resv112: TRAP_UTRAP(UT_TRAP_INSTRUCTION_18,0x112) TRAP_UTRAP(UT_TRAP_INSTRUCTION_19,0x113)
137 tl0_resv114: TRAP_UTRAP(UT_TRAP_INSTRUCTION_20,0x114) TRAP_UTRAP(UT_TRAP_INSTRUCTION_21,0x115)
138 tl0_resv116: TRAP_UTRAP(UT_TRAP_INSTRUCTION_22,0x116) TRAP_UTRAP(UT_TRAP_INSTRUCTION_23,0x117)
139 tl0_resv118: TRAP_UTRAP(UT_TRAP_INSTRUCTION_24,0x118) TRAP_UTRAP(UT_TRAP_INSTRUCTION_25,0x119)
140 tl0_resv11a: TRAP_UTRAP(UT_TRAP_INSTRUCTION_26,0x11a) TRAP_UTRAP(UT_TRAP_INSTRUCTION_27,0x11b)
141 tl0_resv11c: TRAP_UTRAP(UT_TRAP_INSTRUCTION_28,0x11c) TRAP_UTRAP(UT_TRAP_INSTRUCTION_29,0x11d)
142 tl0_resv11e: TRAP_UTRAP(UT_TRAP_INSTRUCTION_30,0x11e) TRAP_UTRAP(UT_TRAP_INSTRUCTION_31,0x11f)
143 tl0_getcc: GETCC_TRAP
144 tl0_setcc: SETCC_TRAP
145 tl0_getpsr: TRAP(do_getpsr)
146 tl0_resv123: BTRAP(0x123) BTRAP(0x124) BTRAP(0x125) BTRAP(0x126)
147 tl0_solindir: INDIRECT_SOLARIS_SYSCALL(156)
148 tl0_resv128: BTRAP(0x128) BTRAP(0x129) BTRAP(0x12a) BTRAP(0x12b) BTRAP(0x12c)
149 tl0_resv12d: BTRAP(0x12d) BTRAP(0x12e) BTRAP(0x12f) BTRAP(0x130) BTRAP(0x131)
150 tl0_resv132: BTRAP(0x132) BTRAP(0x133) BTRAP(0x134) BTRAP(0x135) BTRAP(0x136)
151 tl0_resv137: BTRAP(0x137) BTRAP(0x138) BTRAP(0x139) BTRAP(0x13a) BTRAP(0x13b)
152 tl0_resv13c: BTRAP(0x13c) BTRAP(0x13d) BTRAP(0x13e) BTRAP(0x13f) BTRAP(0x140)
153 tl0_resv141: BTRAP(0x141) BTRAP(0x142) BTRAP(0x143) BTRAP(0x144) BTRAP(0x145)
154 tl0_resv146: BTRAP(0x146) BTRAP(0x147) BTRAP(0x148) BTRAP(0x149) BTRAP(0x14a)
155 tl0_resv14b: BTRAP(0x14b) BTRAP(0x14c) BTRAP(0x14d) BTRAP(0x14e) BTRAP(0x14f)
156 tl0_resv150: BTRAP(0x150) BTRAP(0x151) BTRAP(0x152) BTRAP(0x153) BTRAP(0x154)
157 tl0_resv155: BTRAP(0x155) BTRAP(0x156) BTRAP(0x157) BTRAP(0x158) BTRAP(0x159)
158 tl0_resv15a: BTRAP(0x15a) BTRAP(0x15b) BTRAP(0x15c) BTRAP(0x15d) BTRAP(0x15e)
159 tl0_resv15f: BTRAP(0x15f) BTRAP(0x160) BTRAP(0x161) BTRAP(0x162) BTRAP(0x163)
160 tl0_resv164: BTRAP(0x164) BTRAP(0x165) BTRAP(0x166) BTRAP(0x167) BTRAP(0x168)
161 tl0_resv169: BTRAP(0x169) BTRAP(0x16a) BTRAP(0x16b) BTRAP(0x16c)
162 tl0_linux64: LINUX_64BIT_SYSCALL_TRAP
163 tl0_gsctx: TRAP(sparc64_get_context) TRAP(sparc64_set_context)
164 tl0_resv170: KPROBES_TRAP(0x170) KPROBES_TRAP(0x171) BTRAP(0x172)
165 tl0_resv173: BTRAP(0x173) BTRAP(0x174) BTRAP(0x175) BTRAP(0x176) BTRAP(0x177)
166 tl0_resv178: BTRAP(0x178) BTRAP(0x179) BTRAP(0x17a) BTRAP(0x17b) BTRAP(0x17c)
167 tl0_resv17d: BTRAP(0x17d) BTRAP(0x17e) BTRAP(0x17f)
168 #define BTRAPS(x) BTRAP(x) BTRAP(x+1) BTRAP(x+2) BTRAP(x+3) BTRAP(x+4) BTRAP(x+5) BTRAP(x+6) BTRAP(x+7)
169 tl0_resv180: BTRAPS(0x180) BTRAPS(0x188)
170 tl0_resv190: BTRAPS(0x190) BTRAPS(0x198)
171 tl0_resv1a0: BTRAPS(0x1a0) BTRAPS(0x1a8)
172 tl0_resv1b0: BTRAPS(0x1b0) BTRAPS(0x1b8)
173 tl0_resv1c0: BTRAPS(0x1c0) BTRAPS(0x1c8)
174 tl0_resv1d0: BTRAPS(0x1d0) BTRAPS(0x1d8)
175 tl0_resv1e0: BTRAPS(0x1e0) BTRAPS(0x1e8)
176 tl0_resv1f0: BTRAPS(0x1f0) BTRAPS(0x1f8)
178 sparc64_ttable_tl1:
179 tl1_resv000: BOOT_KERNEL BTRAPTL1(0x1) BTRAPTL1(0x2) BTRAPTL1(0x3)
180 tl1_resv004: BTRAPTL1(0x4) BTRAPTL1(0x5) BTRAPTL1(0x6) BTRAPTL1(0x7)
181 tl1_iax: TRAP_NOSAVE(__spitfire_insn_access_exception_tl1)
182 tl1_itsb_4v: SUN4V_ITSB_MISS
183 tl1_iae: membar #Sync
184 TRAP_NOSAVE_7INSNS(__spitfire_access_error)
185 tl1_resv00b: BTRAPTL1(0xb) BTRAPTL1(0xc) BTRAPTL1(0xd) BTRAPTL1(0xe) BTRAPTL1(0xf)
186 tl1_ill: TRAPTL1(do_ill_tl1)
187 tl1_privop: BTRAPTL1(0x11)
188 tl1_resv012: BTRAPTL1(0x12) BTRAPTL1(0x13) BTRAPTL1(0x14) BTRAPTL1(0x15)
189 tl1_resv016: BTRAPTL1(0x16) BTRAPTL1(0x17) BTRAPTL1(0x18) BTRAPTL1(0x19)
190 tl1_resv01a: BTRAPTL1(0x1a) BTRAPTL1(0x1b) BTRAPTL1(0x1c) BTRAPTL1(0x1d)
191 tl1_resv01e: BTRAPTL1(0x1e) BTRAPTL1(0x1f)
192 tl1_fpdis: TRAP_NOSAVE(do_fpdis)
193 tl1_fpieee: TRAPTL1(do_fpieee_tl1)
194 tl1_fpother: TRAPTL1(do_fpother_tl1)
195 tl1_tof: TRAPTL1(do_tof_tl1)
196 tl1_cwin: CLEAN_WINDOW
197 tl1_div0: TRAPTL1(do_div0_tl1)
198 tl1_resv029: BTRAPTL1(0x29) BTRAPTL1(0x2a) BTRAPTL1(0x2b) BTRAPTL1(0x2c)
199 tl1_resv02d: BTRAPTL1(0x2d) BTRAPTL1(0x2e) BTRAPTL1(0x2f)
200 tl1_dax: TRAP_NOSAVE(__spitfire_data_access_exception_tl1)
201 tl1_dtsb_4v: SUN4V_DTSB_MISS
202 tl1_dae: membar #Sync
203 TRAP_NOSAVE_7INSNS(__spitfire_access_error)
204 tl1_resv033: BTRAPTL1(0x33)
205 tl1_mna: TRAP_NOSAVE(do_mna)
206 tl1_lddfmna: TRAPTL1(do_lddfmna_tl1)
207 tl1_stdfmna: TRAPTL1(do_stdfmna_tl1)
208 tl1_privact: BTRAPTL1(0x37)
209 tl1_resv038: BTRAPTL1(0x38) BTRAPTL1(0x39) BTRAPTL1(0x3a) BTRAPTL1(0x3b)
210 tl1_resv03c: BTRAPTL1(0x3c) BTRAPTL1(0x3d) BTRAPTL1(0x3e) BTRAPTL1(0x3f)
211 tl1_resv040: BTRAPTL1(0x40)
212 tl1_irq1: TRAP_IRQ(do_irq_tl1, 1) TRAP_IRQ(do_irq_tl1, 2) TRAP_IRQ(do_irq_tl1, 3)
213 tl1_irq4: TRAP_IRQ(do_irq_tl1, 4) TRAP_IRQ(do_irq_tl1, 5) TRAP_IRQ(do_irq_tl1, 6)
214 tl1_irq7: TRAP_IRQ(do_irq_tl1, 7) TRAP_IRQ(do_irq_tl1, 8) TRAP_IRQ(do_irq_tl1, 9)
215 tl1_irq10: TRAP_IRQ(do_irq_tl1, 10) TRAP_IRQ(do_irq_tl1, 11)
216 tl1_irq12: TRAP_IRQ(do_irq_tl1, 12) TRAP_IRQ(do_irq_tl1, 13)
217 tl1_irq14: TRAP_IRQ(do_irq_tl1, 14) TRAP_IRQ(do_irq_tl1, 15)
218 tl1_resv050: BTRAPTL1(0x50) BTRAPTL1(0x51) BTRAPTL1(0x52) BTRAPTL1(0x53)
219 tl1_resv054: BTRAPTL1(0x54) BTRAPTL1(0x55) BTRAPTL1(0x56) BTRAPTL1(0x57)
220 tl1_resv058: BTRAPTL1(0x58) BTRAPTL1(0x59) BTRAPTL1(0x5a) BTRAPTL1(0x5b)
221 tl1_resv05c: BTRAPTL1(0x5c) BTRAPTL1(0x5d) BTRAPTL1(0x5e) BTRAPTL1(0x5f)
222 tl1_ivec: TRAP_IVEC
223 tl1_paw: TRAPTL1(do_paw_tl1)
224 tl1_vaw: TRAPTL1(do_vaw_tl1)
225 tl1_cee: BTRAPTL1(0x63)
226 tl1_iamiss: BTRAPTL1(0x64) BTRAPTL1(0x65) BTRAPTL1(0x66) BTRAPTL1(0x67)
227 tl1_damiss:
228 #include "dtlb_miss.S"
229 tl1_daprot:
230 #include "dtlb_prot.S"
231 tl1_fecc: BTRAPTL1(0x70) /* Fast-ECC on Cheetah */
232 tl1_dcpe: BTRAPTL1(0x71) /* D-cache Parity Error on Cheetah+ */
233 tl1_icpe: BTRAPTL1(0x72) /* I-cache Parity Error on Cheetah+ */
234 tl1_resv073: BTRAPTL1(0x73)
235 tl1_resv074: BTRAPTL1(0x74) BTRAPTL1(0x75) BTRAPTL1(0x76) BTRAPTL1(0x77)
236 tl1_resv078: BTRAPTL1(0x78) BTRAPTL1(0x79) BTRAPTL1(0x7a) BTRAPTL1(0x7b)
237 tl1_resv07c: BTRAPTL1(0x7c) BTRAPTL1(0x7d) BTRAPTL1(0x7e) BTRAPTL1(0x7f)
238 tl1_s0n: SPILL_0_NORMAL
239 tl1_s1n: SPILL_1_NORMAL
240 tl1_s2n: SPILL_2_NORMAL
241 tl1_s3n: SPILL_3_NORMAL
242 tl1_s4n: SPILL_4_NORMAL
243 tl1_s5n: SPILL_5_NORMAL
244 tl1_s6n: SPILL_6_NORMAL
245 tl1_s7n: SPILL_7_NORMAL
246 tl1_s0o: SPILL_0_OTHER
247 tl1_s1o: SPILL_1_OTHER
248 tl1_s2o: SPILL_2_OTHER
249 tl1_s3o: SPILL_3_OTHER
250 tl1_s4o: SPILL_4_OTHER
251 tl1_s5o: SPILL_5_OTHER
252 tl1_s6o: SPILL_6_OTHER
253 tl1_s7o: SPILL_7_OTHER
254 tl1_f0n: FILL_0_NORMAL
255 tl1_f1n: FILL_1_NORMAL
256 tl1_f2n: FILL_2_NORMAL
257 tl1_f3n: FILL_3_NORMAL
258 tl1_f4n: FILL_4_NORMAL
259 tl1_f5n: FILL_5_NORMAL
260 tl1_f6n: FILL_6_NORMAL
261 tl1_f7n: FILL_7_NORMAL
262 tl1_f0o: FILL_0_OTHER
263 tl1_f1o: FILL_1_OTHER
264 tl1_f2o: FILL_2_OTHER
265 tl1_f3o: FILL_3_OTHER
266 tl1_f4o: FILL_4_OTHER
267 tl1_f5o: FILL_5_OTHER
268 tl1_f6o: FILL_6_OTHER
269 tl1_f7o: FILL_7_OTHER