view Documentation/networking/generic-hdlc.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 Generic HDLC layer
2 Krzysztof Halasa <khc@pm.waw.pl>
5 Generic HDLC layer currently supports:
6 1. Frame Relay (ANSI, CCITT, Cisco and no LMI).
7 - Normal (routed) and Ethernet-bridged (Ethernet device emulation)
8 interfaces can share a single PVC.
9 - ARP support (no InARP support in the kernel - there is an
10 experimental InARP user-space daemon available on:
11 http://www.kernel.org/pub/linux/utils/net/hdlc/).
12 2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
13 3. Cisco HDLC.
14 4. PPP (uses syncppp.c).
15 5. X.25 (uses X.25 routines).
17 Generic HDLC is a protocol driver only - it needs a low-level driver
18 for your particular hardware.
20 Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible
21 with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
24 Make sure the hdlc.o and the hardware driver are loaded. It should
25 create a number of "hdlc" (hdlc0 etc) network devices, one for each
26 WAN port. You'll need the "sethdlc" utility, get it from:
27 http://www.kernel.org/pub/linux/utils/net/hdlc/
29 Compile sethdlc.c utility:
30 gcc -O2 -Wall -o sethdlc sethdlc.c
31 Make sure you're using a correct version of sethdlc for your kernel.
33 Use sethdlc to set physical interface, clock rate, HDLC mode used,
34 and add any required PVCs if using Frame Relay.
35 Usually you want something like:
37 sethdlc hdlc0 clock int rate 128000
38 sethdlc hdlc0 cisco interval 10 timeout 25
39 or
40 sethdlc hdlc0 rs232 clock ext
41 sethdlc hdlc0 fr lmi ansi
42 sethdlc hdlc0 create 99
43 ifconfig hdlc0 up
44 ifconfig pvc0 localIP pointopoint remoteIP
46 In Frame Relay mode, ifconfig master hdlc device up (without assigning
47 any IP address to it) before using pvc devices.
50 Setting interface:
52 * v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port
53 if the card has software-selectable interfaces
54 loopback - activate hardware loopback (for testing only)
55 * clock ext - both RX clock and TX clock external
56 * clock int - both RX clock and TX clock internal
57 * clock txint - RX clock external, TX clock internal
58 * clock txfromrx - RX clock external, TX clock derived from RX clock
59 * rate - sets clock rate in bps (for "int" or "txint" clock only)
62 Setting protocol:
64 * hdlc - sets raw HDLC (IP-only) mode
65 nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code
66 no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu
67 crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity
69 * hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding
70 as above.
72 * cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported)
73 interval - time in seconds between keepalive packets
74 timeout - time in seconds after last received keepalive packet before
75 we assume the link is down
77 * ppp - sets synchronous PPP mode
79 * x25 - sets X.25 mode
81 * fr - Frame Relay mode
82 lmi ansi / ccitt / cisco / none - LMI (link management) type
83 dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
84 It has nothing to do with clocks!
85 t391 - link integrity verification polling timer (in seconds) - user
86 t392 - polling verification timer (in seconds) - network
87 n391 - full status polling counter - user
88 n392 - error threshold - both user and network
89 n393 - monitored events count - both user and network
91 Frame-Relay only:
92 * create n | delete n - adds / deletes PVC interface with DLCI #n.
93 Newly created interface will be named pvc0, pvc1 etc.
95 * create ether n | delete ether n - adds a device for Ethernet-bridged
96 frames. The device will be named pvceth0, pvceth1 etc.
101 Board-specific issues
102 ---------------------
104 n2.o and c101.o need parameters to work:
106 insmod n2 hw=io,irq,ram,ports[:io,irq,...]
107 example:
108 insmod n2 hw=0x300,10,0xD0000,01
110 or
111 insmod c101 hw=irq,ram[:irq,...]
112 example:
113 insmod c101 hw=9,0xdc000
115 If built into the kernel, these drivers need kernel (command line) parameters:
116 n2.hw=io,irq,ram,ports:...
117 or
118 c101.hw=irq,ram:...
122 If you have a problem with N2, C101 or PLX200SYN card, you can issue the
123 "private" command to see port's packet descriptor rings (in kernel logs):
125 sethdlc hdlc0 private
127 The hardware driver has to be build with #define DEBUG_RINGS.
128 Attaching this info to bug reports would be helpful. Anyway, let me know
129 if you have problems using this.
131 For patches and other info look at:
132 <http://www.kernel.org/pub/linux/utils/net/hdlc/>.