ia64/linux-2.6.18-xen.hg

view arch/m32r/mappi2/dot.gdbinit.vdec2 @ 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 # .gdbinit file
2 # $Id: dot.gdbinit.vdec2,v 1.2 2004/11/11 02:03:15 takata Exp $
4 # setting
5 set width 0d70
6 set radix 0d16
7 use_debug_dma
9 # Initialize SDRAM controller for Mappi
10 define sdram_init
11 # SDIR0
12 set *(unsigned long *)0x00ef6008=0x00000182
13 # SDIR1
14 set *(unsigned long *)0x00ef600c=0x00000001
15 # Initialize wait
16 shell sleep 1
17 # Ch0-MOD
18 set *(unsigned long *)0x00ef602c=0x00000020
19 # Ch0-TR
20 set *(unsigned long *)0x00ef6028=0x00041302
21 # Ch0-ADR
22 set *(unsigned long *)0x00ef6020=0x08000004
23 # AutoRef On
24 set *(unsigned long *)0x00ef6004=0x00010705
25 # Access enable
26 set *(unsigned long *)0x00ef6024=0x00000001
27 end
28 document sdram_init
29 Mappi SDRAM controller initialization
30 0x08000000 - 0x0bffffff (64MB)
31 end
33 # Initialize SDRAM controller for Mappi
34 define sdram_init2
35 # SDIR0
36 set *(unsigned long *)0x00ef6008=0x00000182
37 # Ch0-MOD
38 set *(unsigned long *)0x00ef602c=0x00000020
39 # Ch0-TR
40 set *(unsigned long *)0x00ef6028=0x00010002
41 # Ch0-ADR
42 set *(unsigned long *)0x00ef6020=0x08000004
43 # AutoRef On
44 set *(unsigned long *)0x00ef6004=0x00010107
45 # SDIR1
46 set *(unsigned long *)0x00ef600c=0x00000001
47 # Initialize wait
48 shell sleep 1
49 # Access enable
50 set *(unsigned long *)0x00ef6024=0x00000001
51 shell sleep 1
52 end
53 document sdram_init
54 Mappi SDRAM controller initialization
55 0x08000000 - 0x0bffffff (64MB)
56 end
58 # Initialize LAN controller for Mappi
59 define lanc_init
60 # Set BSEL1 (BSEL3 for the Chaos's bselc)
61 #set *(unsigned long *)0x00ef5004 = 0x0fff330f
62 #set *(unsigned long *)0x00ef5004 = 0x01113301
64 # set *(unsigned long *)0x00ef5004 = 0x02011101
65 # set *(unsigned long *)0x00ef5004 = 0x04441104
67 # BSEL5
68 # set *(unsigned long *)0x00ef5014 = 0x0ccc310c
69 # set *(unsigned long *)0x00ef5014 = 0x0303310f
70 # set *(unsigned long *)0x00ef5014 = 0x01011102 -> NG
71 # set *(unsigned long *)0x00ef5014 = 0x03033103
73 set *(unsigned long *)0x00ef500c = 0x0b0b1304
74 set *(unsigned long *)0x00ef5010 = 0x03033302
75 # set *(unsigned long *)0x00ef5018 = 0x02223302
76 end
78 # MMU enable
79 define mmu_enable
80 set $evb=0x88000000
81 set *(unsigned long *)0xffff0024=1
82 end
84 # MMU disable
85 define mmu_disable
86 set $evb=0
87 set *(unsigned long *)0xffff0024=0
88 end
90 # Show TLB entries
91 define show_tlb_entries
92 set $i = 0
93 set $addr = $arg0
94 while ($i < 0d16 )
95 set $tlb_tag = *(unsigned long*)$addr
96 set $tlb_data = *(unsigned long*)($addr + 4)
97 printf " [%2d] 0x%08lx : 0x%08lx - 0x%08lx\n", $i, $addr, $tlb_tag, $tlb_data
98 set $i = $i + 1
99 set $addr = $addr + 8
100 end
101 end
102 define itlb
103 set $itlb=0xfe000000
104 show_tlb_entries $itlb
105 end
106 define dtlb
107 set $dtlb=0xfe000800
108 show_tlb_entries $dtlb
109 end
111 # Cache ON
112 define set_cache_type
113 set $mctype = (void*)0xfffffff8
114 # chaos
115 # set *(unsigned long *)($mctype) = 0x0000c000
116 # m32102 i-cache only
117 set *(unsigned long *)($mctype) = 0x00008000
118 # m32102 d-cache only
119 # set *(unsigned long *)($mctype) = 0x00004000
120 end
121 define cache_on
122 set $param = (void*)0x08001000
123 set *(unsigned long *)($param) = 0x60ff6102
124 end
127 # Show current task structure
128 define show_current
129 set $current = $spi & 0xffffe000
130 printf "$current=0x%08lX\n",$current
131 print *(struct task_struct *)$current
132 end
134 # Show user assigned task structure
135 define show_task
136 set $task = $arg0 & 0xffffe000
137 printf "$task=0x%08lX\n",$task
138 print *(struct task_struct *)$task
139 end
140 document show_task
141 Show user assigned task structure
142 arg0 : task structure address
143 end
145 # Show M32R registers
146 define show_regs
147 printf " R0[0x%08lX] R1[0x%08lX] R2[0x%08lX] R3[0x%08lX]\n",$r0,$r1,$r2,$r3
148 printf " R4[0x%08lX] R5[0x%08lX] R6[0x%08lX] R7[0x%08lX]\n",$r4,$r5,$r6,$r7
149 printf " R8[0x%08lX] R9[0x%08lX] R10[0x%08lX] R11[0x%08lX]\n",$r8,$r9,$r10,$r11
150 printf "R12[0x%08lX] FP[0x%08lX] LR[0x%08lX] SP[0x%08lX]\n",$r12,$fp,$lr,$sp
151 printf "PSW[0x%08lX] CBR[0x%08lX] SPI[0x%08lX] SPU[0x%08lX]\n",$psw,$cbr,$spi,$spu
152 printf "BPC[0x%08lX] PC[0x%08lX] ACCL[0x%08lX] ACCH[0x%08lX]\n",$bpc,$pc,$accl,$acch
153 printf "EVB[0x%08lX]\n",$evb
155 set $mests = *(unsigned long *)0xffff000c
156 set $mdeva = *(unsigned long *)0xffff0010
157 printf "MESTS[0x%08lX] MDEVA[0x%08lX]\n",$mests,$mdeva
158 end
161 # Setup all
162 define setup
163 sdram_init
164 # lanc_init
165 # dispc_init
166 # set $evb=0x08000000
167 end
169 # Load modules
170 define load_modules
171 use_debug_dma
172 load
173 # load busybox.mot
174 end
176 # Set kernel parameters
177 define set_kernel_parameters
178 set $param = (void*)0x08001000
180 ## MOUNT_ROOT_RDONLY
181 set {long}($param+0x00)=0
182 ## RAMDISK_FLAGS
183 #set {long}($param+0x04)=0
184 ## ORIG_ROOT_DEV
185 #set {long}($param+0x08)=0x00000100
186 ## LOADER_TYPE
187 #set {long}($param+0x0C)=0
188 ## INITRD_START
189 set {long}($param+0x10)=0x082a0000
190 ## INITRD_SIZE
191 set {long}($param+0x14)=0d6200000
193 # M32R_CPUCLK
194 set *(unsigned long *)($param + 0x0018) = 0d25000000
195 # M32R_BUSCLK
196 set *(unsigned long *)($param + 0x001c) = 0d25000000
197 # M32R_TIMER_DIVIDE
198 set *(unsigned long *)($param + 0x0020) = 0d128
201 set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.2.6 nfsaddrs=192.168.0.102:192.168.0.1:192.168.0.1:255.255.255.0:mappi: \0"
204 end
206 # Boot
207 define boot
208 set_kernel_parameters
209 debug_chaos
210 set $pc=0x08002000
211 set $fp=0
212 del b
213 si
214 end
216 # Restart
217 define restart
218 sdireset
219 sdireset
220 setup
221 load_modules
222 boot
223 end
225 sdireset
226 sdireset
227 file vmlinux
228 target m32rsdi
230 restart
231 boot