view Documentation/networking/vortex.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
line source
1 Documentation/networking/vortex.txt
2 Andrew Morton <andrewm@uow.edu.au>
3 30 April 2000
6 This document describes the usage and errata of the 3Com "Vortex" device
7 driver for Linux, 3c59x.c.
9 The driver was written by Donald Becker <becker@scyld.com>
11 Don is no longer the prime maintainer of this version of the driver.
12 Please report problems to one or more of:
14 Andrew Morton <akpm@osdl.org>
15 Netdev mailing list <netdev@vger.kernel.org>
16 Linux kernel mailing list <linux-kernel@vger.kernel.org>
18 Please note the 'Reporting and Diagnosing Problems' section at the end
19 of this file.
22 Since kernel 2.3.99-pre6, this driver incorporates the support for the
23 3c575-series Cardbus cards which used to be handled by 3c575_cb.c.
25 This driver supports the following hardware:
27 3c590 Vortex 10Mbps
28 3c592 EISA 10Mbps Demon/Vortex
29 3c597 EISA Fast Demon/Vortex
30 3c595 Vortex 100baseTx
31 3c595 Vortex 100baseT4
32 3c595 Vortex 100base-MII
33 3c900 Boomerang 10baseT
34 3c900 Boomerang 10Mbps Combo
35 3c900 Cyclone 10Mbps TPO
36 3c900 Cyclone 10Mbps Combo
37 3c900 Cyclone 10Mbps TPC
38 3c900B-FL Cyclone 10base-FL
39 3c905 Boomerang 100baseTx
40 3c905 Boomerang 100baseT4
41 3c905B Cyclone 100baseTx
42 3c905B Cyclone 10/100/BNC
43 3c905B-FX Cyclone 100baseFx
44 3c905C Tornado
45 3c920B-EMB-WNM (ATI Radeon 9100 IGP)
46 3c980 Cyclone
47 3c980C Python-T
48 3cSOHO100-TX Hurricane
49 3c555 Laptop Hurricane
50 3c556 Laptop Tornado
51 3c556B Laptop Hurricane
52 3c575 [Megahertz] 10/100 LAN CardBus
53 3c575 Boomerang CardBus
54 3CCFE575BT Cyclone CardBus
55 3CCFE575CT Tornado CardBus
56 3CCFE656 Cyclone CardBus
57 3CCFEM656B Cyclone+Winmodem CardBus
58 3CXFEM656C Tornado+Winmodem CardBus
59 3c450 HomePNA Tornado
60 3c920 Tornado
61 3c982 Hydra Dual Port A
62 3c982 Hydra Dual Port B
63 3c905B-T4
64 3c920B-EMB-WNM Tornado
66 Module parameters
67 =================
69 There are several parameters which may be provided to the driver when
70 its module is loaded. These are usually placed in /etc/modprobe.conf
71 (/etc/modules.conf in 2.4). Example:
73 options 3c59x debug=3 rx_copybreak=300
75 If you are using the PCMCIA tools (cardmgr) then the options may be
76 placed in /etc/pcmcia/config.opts:
78 module "3c59x" opts "debug=3 rx_copybreak=300"
81 The supported parameters are:
83 debug=N
85 Where N is a number from 0 to 7. Anything above 3 produces a lot
86 of output in your system logs. debug=1 is default.
88 options=N1,N2,N3,...
90 Each number in the list provides an option to the corresponding
91 network card. So if you have two 3c905's and you wish to provide
92 them with option 0x204 you would use:
94 options=0x204,0x204
96 The individual options are composed of a number of bitfields which
97 have the following meanings:
99 Possible media type settings
100 0 10baseT
101 1 10Mbs AUI
102 2 undefined
103 3 10base2 (BNC)
104 4 100base-TX
105 5 100base-FX
106 6 MII (Media Independent Interface)
107 7 Use default setting from EEPROM
108 8 Autonegotiate
109 9 External MII
110 10 Use default setting from EEPROM
112 When generating a value for the 'options' setting, the above media
113 selection values may be OR'ed (or added to) the following:
115 0x8000 Set driver debugging level to 7
116 0x4000 Set driver debugging level to 2
117 0x0400 Enable Wake-on-LAN
118 0x0200 Force full duplex mode.
119 0x0010 Bus-master enable bit (Old Vortex cards only)
121 For example:
123 insmod 3c59x options=0x204
125 will force full-duplex 100base-TX, rather than allowing the usual
126 autonegotiation.
128 global_options=N
130 Sets the `options' parameter for all 3c59x NICs in the machine.
131 Entries in the `options' array above will override any setting of
132 this.
134 full_duplex=N1,N2,N3...
136 Similar to bit 9 of 'options'. Forces the corresponding card into
137 full-duplex mode. Please use this in preference to the `options'
138 parameter.
140 In fact, please don't use this at all! You're better off getting
141 autonegotiation working properly.
143 global_full_duplex=N1
145 Sets full duplex mode for all 3c59x NICs in the machine. Entries
146 in the `full_duplex' array above will override any setting of this.
148 flow_ctrl=N1,N2,N3...
150 Use 802.3x MAC-layer flow control. The 3com cards only support the
151 PAUSE command, which means that they will stop sending packets for a
152 short period if they receive a PAUSE frame from the link partner.
154 The driver only allows flow control on a link which is operating in
155 full duplex mode.
157 This feature does not appear to work on the 3c905 - only 3c905B and
158 3c905C have been tested.
160 The 3com cards appear to only respond to PAUSE frames which are
161 sent to the reserved destination address of 01:80:c2:00:00:01. They
162 do not honour PAUSE frames which are sent to the station MAC address.
164 rx_copybreak=M
166 The driver preallocates 32 full-sized (1536 byte) network buffers
167 for receiving. When a packet arrives, the driver has to decide
168 whether to leave the packet in its full-sized buffer, or to allocate
169 a smaller buffer and copy the packet across into it.
171 This is a speed/space tradeoff.
173 The value of rx_copybreak is used to decide when to make the copy.
174 If the packet size is less than rx_copybreak, the packet is copied.
175 The default value for rx_copybreak is 200 bytes.
177 max_interrupt_work=N
179 The driver's interrupt service routine can handle many receive and
180 transmit packets in a single invocation. It does this in a loop.
181 The value of max_interrupt_work governs how mnay times the interrupt
182 service routine will loop. The default value is 32 loops. If this
183 is exceeded the interrupt service routine gives up and generates a
184 warning message "eth0: Too much work in interrupt".
186 hw_checksums=N1,N2,N3,...
188 Recent 3com NICs are able to generate IPv4, TCP and UDP checksums
189 in hardware. Linux has used the Rx checksumming for a long time.
190 The "zero copy" patch which is planned for the 2.4 kernel series
191 allows you to make use of the NIC's DMA scatter/gather and transmit
192 checksumming as well.
194 The driver is set up so that, when the zerocopy patch is applied,
195 all Tornado and Cyclone devices will use S/G and Tx checksums.
197 This module parameter has been provided so you can override this
198 decision. If you think that Tx checksums are causing a problem, you
199 may disable the feature with `hw_checksums=0'.
201 If you think your NIC should be performing Tx checksumming and the
202 driver isn't enabling it, you can force the use of hardware Tx
203 checksumming with `hw_checksums=1'.
205 The driver drops a message in the logfiles to indicate whether or
206 not it is using hardware scatter/gather and hardware Tx checksums.
208 Scatter/gather and hardware checksums provide considerable
209 performance improvement for the sendfile() system call, but a small
210 decrease in throughput for send(). There is no effect upon receive
211 efficiency.
213 compaq_ioaddr=N
214 compaq_irq=N
215 compaq_device_id=N
217 "Variables to work-around the Compaq PCI BIOS32 problem"....
219 watchdog=N
221 Sets the time duration (in milliseconds) after which the kernel
222 decides that the transmitter has become stuck and needs to be reset.
223 This is mainly for debugging purposes, although it may be advantageous
224 to increase this value on LANs which have very high collision rates.
225 The default value is 5000 (5.0 seconds).
227 enable_wol=N1,N2,N3,...
229 Enable Wake-on-LAN support for the relevant interface. Donald
230 Becker's `ether-wake' application may be used to wake suspended
231 machines.
233 Also enables the NIC's power management support.
235 global_enable_wol=N
237 Sets enable_wol mode for all 3c59x NICs in the machine. Entries in
238 the `enable_wol' array above will override any setting of this.
240 Media selection
241 ---------------
243 A number of the older NICs such as the 3c590 and 3c900 series have
244 10base2 and AUI interfaces.
246 Prior to January, 2001 this driver would autoeselect the 10base2 or AUI
247 port if it didn't detect activity on the 10baseT port. It would then
248 get stuck on the 10base2 port and a driver reload was necessary to
249 switch back to 10baseT. This behaviour could not be prevented with a
250 module option override.
252 Later (current) versions of the driver _do_ support locking of the
253 media type. So if you load the driver module with
255 modprobe 3c59x options=0
257 it will permanently select the 10baseT port. Automatic selection of
258 other media types does not occur.
261 Transmit error, Tx status register 82
262 -------------------------------------
264 This is a common error which is almost always caused by another host on
265 the same network being in full-duplex mode, while this host is in
266 half-duplex mode. You need to find that other host and make it run in
267 half-duplex mode or fix this host to run in full-duplex mode.
269 As a last resort, you can force the 3c59x driver into full-duplex mode
270 with
272 options 3c59x full_duplex=1
274 but this has to be viewed as a workaround for broken network gear and
275 should only really be used for equipment which cannot autonegotiate.
278 Additional resources
279 --------------------
281 Details of the device driver implementation are at the top of the source file.
283 Additional documentation is available at Don Becker's Linux Drivers site:
285 http://www.scyld.com/vortex.html
287 Donald Becker's driver development site:
289 http://www.scyld.com/network.html
291 Donald's vortex-diag program is useful for inspecting the NIC's state:
293 http://www.scyld.com/ethercard_diag.html
295 Donald's mii-diag program may be used for inspecting and manipulating
296 the NIC's Media Independent Interface subsystem:
298 http://www.scyld.com/ethercard_diag.html#mii-diag
300 Donald's wake-on-LAN page:
302 http://www.scyld.com/wakeonlan.html
304 3Com's DOS-based application for setting up the NICs EEPROMs:
306 ftp://ftp.3com.com/pub/nic/3c90x/3c90xx2.exe
308 Driver updates and a detailed changelog for the modifications which
309 were made for the 2.3/2,4 series kernel is available at
311 http://www.zip.com.au/~akpm/linux/#3c59x-bc
314 Autonegotiation notes
315 ---------------------
317 The driver uses a one-minute heartbeat for adapting to changes in
318 the external LAN environment if link is up and 5 seconds if link is down.
319 This means that when, for example, a machine is unplugged from a hubbed
320 10baseT LAN plugged into a switched 100baseT LAN, the throughput
321 will be quite dreadful for up to sixty seconds. Be patient.
323 Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>:
325 On a side note, adding HAS_NWAY seems to share a problem with the
326 Cisco 6509 switch. Specifically, you need to change the spanning
327 tree parameter for the port the machine is plugged into to 'portfast'
328 mode. Otherwise, the negotiation fails. This has been an issue
329 we've noticed for a while but haven't had the time to track down.
331 Cisco switches (Jeff Busch <jbusch@deja.com>)
333 My "standard config" for ports to which PC's/servers connect directly:
335 interface FastEthernet0/N
336 description machinename
337 load-interval 30
338 spanning-tree portfast
340 If autonegotiation is a problem, you may need to specify "speed
341 100" and "duplex full" as well (or "speed 10" and "duplex half").
343 WARNING: DO NOT hook up hubs/switches/bridges to these
344 specially-configured ports! The switch will become very confused.
347 Reporting and diagnosing problems
348 ---------------------------------
350 Maintainers find that accurate and complete problem reports are
351 invaluable in resolving driver problems. We are frequently not able to
352 reproduce problems and must rely on your patience and efforts to get to
353 the bottom of the problem.
355 If you believe you have a driver problem here are some of the
356 steps you should take:
358 - Is it really a driver problem?
360 Eliminate some variables: try different cards, different
361 computers, different cables, different ports on the switch/hub,
362 different versions of the kernel or ofthe driver, etc.
364 - OK, it's a driver problem.
366 You need to generate a report. Typically this is an email to the
367 maintainer and/or linux-net@vger.kernel.org. The maintainer's
368 email address will be inthe driver source or in the MAINTAINERS file.
370 - The contents of your report will vary a lot depending upon the
371 problem. If it's a kernel crash then you should refer to the
374 But for most problems it is useful to provide the following:
376 o Kernel version, driver version
378 o A copy of the banner message which the driver generates when
379 it is initialised. For example:
381 eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
382 8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
383 MII transceiver found at address 24, status 782d.
384 Enabling bus-master transmits and whole-frame receives.
386 NOTE: You must provide the `debug=2' modprobe option to generate
387 a full detection message. Please do this:
389 modprobe 3c59x debug=2
391 o If it is a PCI device, the relevant output from 'lspci -vx', eg:
393 00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
394 Subsystem: 3Com Corporation: Unknown device 9200
395 Flags: bus master, medium devsel, latency 32, IRQ 19
396 I/O ports at a400 [size=128]
397 Memory at db000000 (32-bit, non-prefetchable) [size=128]
398 Expansion ROM at <unassigned> [disabled] [size=128K]
399 Capabilities: [dc] Power Management version 2
400 00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00
401 10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00
402 20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
403 30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
405 o A description of the environment: 10baseT? 100baseT?
406 full/half duplex? switched or hubbed?
408 o Any additional module parameters which you may be providing to the driver.
410 o Any kernel logs which are produced. The more the merrier.
411 If this is a large file and you are sending your report to a
412 mailing list, mention that you have the logfile, but don't send
413 it. If you're reporting direct to the maintainer then just send
414 it.
416 To ensure that all kernel logs are available, add the
417 following line to /etc/syslog.conf:
419 kern.* /var/log/messages
421 Then restart syslogd with:
423 /etc/rc.d/init.d/syslog restart
425 (The above may vary, depending upon which Linux distribution you use).
427 o If your problem is reproducible then that's great. Try the
428 following:
430 1) Increase the debug level. Usually this is done via:
432 a) modprobe driver debug=7
433 b) In /etc/modprobe.conf (or /etc/modules.conf for 2.4):
434 options driver debug=7
436 2) Recreate the problem with the higher debug level,
437 send all logs to the maintainer.
439 3) Download you card's diagnostic tool from Donald
440 Becker's website <http://www.scyld.com/ethercard_diag.html>.
441 Download mii-diag.c as well. Build these.
443 a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
444 working correctly. Save the output.
446 b) Run the above commands when the card is malfunctioning. Send
447 both sets of output.
449 Finally, please be patient and be prepared to do some work. You may
450 end up working on this problem for a week or more as the maintainer
451 asks more questions, asks for more tests, asks for patches to be
452 applied, etc. At the end of it all, the problem may even remain
453 unresolved.