ia64/linux-2.6.18-xen.hg

view Documentation/networking/dl2k.txt @ 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
2 D-Link DL2000-based Gigabit Ethernet Adapter Installation
3 for Linux
4 May 23, 2002
6 Contents
7 ========
8 - Compatibility List
9 - Quick Install
10 - Compiling the Driver
11 - Installing the Driver
12 - Option parameter
13 - Configuration Script Sample
14 - Troubleshooting
17 Compatibility List
18 =================
19 Adapter Support:
21 D-Link DGE-550T Gigabit Ethernet Adapter.
22 D-Link DGE-550SX Gigabit Ethernet Adapter.
23 D-Link DL2000-based Gigabit Ethernet Adapter.
26 The driver support Linux kernel 2.4.7 later. We had tested it
27 on the environments below.
29 . Red Hat v6.2 (update kernel to 2.4.7)
30 . Red Hat v7.0 (update kernel to 2.4.7)
31 . Red Hat v7.1 (kernel 2.4.7)
32 . Red Hat v7.2 (kernel 2.4.7-10)
35 Quick Install
36 =============
37 Install linux driver as following command:
39 1. make all
40 2. insmod dl2k.ko
41 3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
42 ^^^^^^^^^^^^^^^\ ^^^^^^^^\
43 IP NETMASK
44 Now eth0 should active, you can test it by "ping" or get more information by
45 "ifconfig". If tested ok, continue the next step.
47 4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net
48 5. Add the following line to /etc/modprobe.conf:
49 alias eth0 dl2k
50 6. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0
51 located at /etc/sysconfig/network-scripts or create it manually.
52 [see - Configuration Script Sample]
53 7. Driver will automatically load and configure at next boot time.
55 Compiling the Driver
56 ====================
57 In Linux, NIC drivers are most commonly configured as loadable modules.
58 The approach of building a monolithic kernel has become obsolete. The driver
59 can be compiled as part of a monolithic kernel, but is strongly discouraged.
60 The remainder of this section assumes the driver is built as a loadable module.
61 In the Linux environment, it is a good idea to rebuild the driver from the
62 source instead of relying on a precompiled version. This approach provides
63 better reliability since a precompiled driver might depend on libraries or
64 kernel features that are not present in a given Linux installation.
66 The 3 files necessary to build Linux device driver are dl2k.c, dl2k.h and
67 Makefile. To compile, the Linux installation must include the gcc compiler,
68 the kernel source, and the kernel headers. The Linux driver supports Linux
69 Kernels 2.4.7. Copy the files to a directory and enter the following command
70 to compile and link the driver:
72 CD-ROM drive
73 ------------
75 [root@XXX /] mkdir cdrom
76 [root@XXX /] mount -r -t iso9660 -o conv=auto /dev/cdrom /cdrom
77 [root@XXX /] cd root
78 [root@XXX /root] mkdir dl2k
79 [root@XXX /root] cd dl2k
80 [root@XXX dl2k] cp /cdrom/linux/dl2k.tgz /root/dl2k
81 [root@XXX dl2k] tar xfvz dl2k.tgz
82 [root@XXX dl2k] make all
84 Floppy disc drive
85 -----------------
87 [root@XXX /] cd root
88 [root@XXX /root] mkdir dl2k
89 [root@XXX /root] cd dl2k
90 [root@XXX dl2k] mcopy a:/linux/dl2k.tgz /root/dl2k
91 [root@XXX dl2k] tar xfvz dl2k.tgz
92 [root@XXX dl2k] make all
94 Installing the Driver
95 =====================
97 Manual Installation
98 -------------------
99 Once the driver has been compiled, it must be loaded, enabled, and bound
100 to a protocol stack in order to establish network connectivity. To load a
101 module enter the command:
103 insmod dl2k.o
105 or
107 insmod dl2k.o <optional parameter> ; add parameter
109 ===============================================================
110 example: insmod dl2k.o media=100mbps_hd
111 or insmod dl2k.o media=3
112 or insmod dl2k.o media=3,2 ; for 2 cards
113 ===============================================================
115 Please reference the list of the command line parameters supported by
116 the Linux device driver below.
118 The insmod command only loads the driver and gives it a name of the form
119 eth0, eth1, etc. To bring the NIC into an operational state,
120 it is necessary to issue the following command:
122 ifconfig eth0 up
124 Finally, to bind the driver to the active protocol (e.g., TCP/IP with
125 Linux), enter the following command:
127 ifup eth0
129 Note that this is meaningful only if the system can find a configuration
130 script that contains the necessary network information. A sample will be
131 given in the next paragraph.
133 The commands to unload a driver are as follows:
135 ifdown eth0
136 ifconfig eth0 down
137 rmmod dl2k.o
139 The following are the commands to list the currently loaded modules and
140 to see the current network configuration.
142 lsmod
143 ifconfig
146 Automated Installation
147 ----------------------
148 This section describes how to install the driver such that it is
149 automatically loaded and configured at boot time. The following description
150 is based on a Red Hat 6.0/7.0 distribution, but it can easily be ported to
151 other distributions as well.
153 Red Hat v6.x/v7.x
154 -----------------
155 1. Copy dl2k.o to the network modules directory, typically
156 /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net.
157 2. Locate the boot module configuration file, most commonly modprobe.conf
158 or modules.conf (for 2.4) in the /etc directory. Add the following lines:
160 alias ethx dl2k
161 options dl2k <optional parameters>
163 where ethx will be eth0 if the NIC is the only ethernet adapter, eth1 if
164 one other ethernet adapter is installed, etc. Refer to the table in the
165 previous section for the list of optional parameters.
166 3. Locate the network configuration scripts, normally the
167 /etc/sysconfig/network-scripts directory, and create a configuration
168 script named ifcfg-ethx that contains network information.
169 4. Note that for most Linux distributions, Red Hat included, a configuration
170 utility with a graphical user interface is provided to perform steps 2
171 and 3 above.
174 Parameter Description
175 =====================
176 You can install this driver without any addtional parameter. However, if you
177 are going to have extensive functions then it is necessary to set extra
178 parameter. Below is a list of the command line parameters supported by the
179 Linux device
180 driver.
182 mtu=packet_size - Specifies the maximum packet size. default
183 is 1500.
185 media=media_type - Specifies the media type the NIC operates at.
186 autosense Autosensing active media.
187 10mbps_hd 10Mbps half duplex.
188 10mbps_fd 10Mbps full duplex.
189 100mbps_hd 100Mbps half duplex.
190 100mbps_fd 100Mbps full duplex.
191 1000mbps_fd 1000Mbps full duplex.
192 1000mbps_hd 1000Mbps half duplex.
193 0 Autosensing active media.
194 1 10Mbps half duplex.
195 2 10Mbps full duplex.
196 3 100Mbps half duplex.
197 4 100Mbps full duplex.
198 5 1000Mbps half duplex.
199 6 1000Mbps full duplex.
201 By default, the NIC operates at autosense.
202 1000mbps_fd and 1000mbps_hd types are only
203 available for fiber adapter.
205 vlan=n - Specifies the VLAN ID. If vlan=0, the
206 Virtual Local Area Network (VLAN) function is
207 disable.
209 jumbo=[0|1] - Specifies the jumbo frame support. If jumbo=1,
210 the NIC accept jumbo frames. By default, this
211 function is disabled.
212 Jumbo frame usually improve the performance
213 int gigabit.
214 This feature need jumbo frame compatible
215 remote.
217 rx_coalesce=m - Number of rx frame handled each interrupt.
218 rx_timeout=n - Rx DMA wait time for an interrupt.
219 If set rx_coalesce > 0, hardware only assert
220 an interrupt for m frames. Hardware won't
221 assert rx interrupt until m frames received or
222 reach timeout of n * 640 nano seconds.
223 Set proper rx_coalesce and rx_timeout can
224 reduce congestion collapse and overload which
225 has been a bottlenect for high speed network.
227 For example, rx_coalesce=10 rx_timeout=800.
228 that is, hardware assert only 1 interrupt
229 for 10 frames received or timeout of 512 us.
231 tx_coalesce=n - Number of tx frame handled each interrupt.
232 Set n > 1 can reduce the interrupts
233 congestion usually lower performance of
234 high speed network card. Default is 16.
236 tx_flow=[1|0] - Specifies the Tx flow control. If tx_flow=0,
237 the Tx flow control disable else driver
238 autodetect.
239 rx_flow=[1|0] - Specifies the Rx flow control. If rx_flow=0,
240 the Rx flow control enable else driver
241 autodetect.
244 Configuration Script Sample
245 ===========================
246 Here is a sample of a simple configuration script:
248 DEVICE=eth0
249 USERCTL=no
250 ONBOOT=yes
251 POOTPROTO=none
252 BROADCAST=207.200.5.255
253 NETWORK=207.200.5.0
254 NETMASK=255.255.255.0
255 IPADDR=207.200.5.2
258 Troubleshooting
259 ===============
260 Q1. Source files contain ^ M behind every line.
261 Make sure all files are Unix file format (no LF). Try the following
262 shell command to convert files.
264 cat dl2k.c | col -b > dl2k.tmp
265 mv dl2k.tmp dl2k.c
267 OR
269 cat dl2k.c | tr -d "\r" > dl2k.tmp
270 mv dl2k.tmp dl2k.c
272 Q2: Could not find header files (*.h) ?
273 To compile the driver, you need kernel header files. After
274 installing the kernel source, the header files are usually located in
275 /usr/src/linux/include, which is the default include directory configured
276 in Makefile. For some distributions, there is a copy of header files in
277 /usr/src/include/linux and /usr/src/include/asm, that you can change the
278 INCLUDEDIR in Makefile to /usr/include without installing kernel source.
279 Note that RH 7.0 didn't provide correct header files in /usr/include,
280 including those files will make a wrong version driver.