view Documentation/networking/README.sb1000 @ 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 sb1000 is a module network device driver for the General Instrument (also known
2 as NextLevel) SURFboard1000 internal cable modem board. This is an ISA card
3 which is used by a number of cable TV companies to provide cable modem access.
4 It's a one-way downstream-only cable modem, meaning that your upstream net link
5 is provided by your regular phone modem.
7 This driver was written by Franco Venturi <fventuri@mediaone.net>. He deserves
8 a great deal of thanks for this wonderful piece of code!
10 -----------------------------------------------------------------------------
12 Support for this device is now a part of the standard Linux kernel. The
13 driver source code file is drivers/net/sb1000.c. In addition to this
14 you will need:
16 1.) The "cmconfig" program. This is a utility which supplements "ifconfig"
17 to configure the cable modem and network interface (usually called "cm0");
18 and
20 2.) Several PPP scripts which live in /etc/ppp to make connecting via your
21 cable modem easy.
23 These utilities can be obtained from:
25 http://www.jacksonville.net/~fventuri/
27 in Franco's original source code distribution .tar.gz file. Support for
28 the sb1000 driver can be found at:
30 http://home.adelphia.net/~siglercm/sb1000.html
31 http://linuxpower.cx/~cable/
33 along with these utilities.
35 3.) The standard isapnp tools. These are necessary to configure your SB1000
36 card at boot time (or afterwards by hand) since it's a PnP card.
38 If you don't have these installed as a standard part of your Linux
39 distribution, you can find them at:
41 http://www.roestock.demon.co.uk/isapnptools/
43 or check your Linux distribution binary CD or their web site. For help with
44 isapnp, pnpdump, or /etc/isapnp.conf, go to:
46 http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html
48 -----------------------------------------------------------------------------
50 To make the SB1000 card work, follow these steps:
52 1.) Run `make config', or `make menuconfig', or `make xconfig', whichever
53 you prefer, in the top kernel tree directory to set up your kernel
54 configuration. Make sure to say "Y" to "Prompt for development drivers"
55 and to say "M" to the sb1000 driver. Also say "Y" or "M" to all the standard
56 networking questions to get TCP/IP and PPP networking support.
58 2.) *BEFORE* you build the kernel, edit drivers/net/sb1000.c. Make sure
59 to redefine the value of READ_DATA_PORT to match the I/O address used
60 by isapnp to access your PnP cards. This is the value of READPORT in
61 /etc/isapnp.conf or given by the output of pnpdump.
63 3.) Build and install the kernel and modules as usual.
65 4.) Boot your new kernel following the usual procedures.
67 5.) Set up to configure the new SB1000 PnP card by capturing the output
68 of "pnpdump" to a file and editing this file to set the correct I/O ports,
69 IRQ, and DMA settings for all your PnP cards. Make sure none of the settings
70 conflict with one another. Then test this configuration by running the
71 "isapnp" command with your new config file as the input. Check for
72 errors and fix as necessary. (As an aside, I use I/O ports 0x110 and
73 0x310 and IRQ 11 for my SB1000 card and these work well for me. YMMV.)
74 Then save the finished config file as /etc/isapnp.conf for proper configuration
75 on subsequent reboots.
77 6.) Download the original file sb1000-1.1.2.tar.gz from Franco's site or one of
78 the others referenced above. As root, unpack it into a temporary directory and
79 do a `make cmconfig' and then `install -c cmconfig /usr/local/sbin'. Don't do
80 `make install' because it expects to find all the utilities built and ready for
81 installation, not just cmconfig.
83 7.) As root, copy all the files under the ppp/ subdirectory in Franco's
84 tar file into /etc/ppp, being careful not to overwrite any files that are
85 already in there. Then modify ppp@gi-on to set the correct login name,
86 phone number, and frequency for the cable modem. Also edit pap-secrets
87 to specify your login name and password and any site-specific information
88 you need.
90 8.) Be sure to modify /etc/ppp/firewall to use ipchains instead of
91 the older ipfwadm commands from the 2.0.x kernels. There's a neat utility to
92 convert ipfwadm commands to ipchains commands:
94 http://users.dhp.com/~whisper/ipfwadm2ipchains/
96 You may also wish to modify the firewall script to implement a different
97 firewalling scheme.
99 9.) Start the PPP connection via the script /etc/ppp/ppp@gi-on. You must be
100 root to do this. It's better to use a utility like sudo to execute
101 frequently used commands like this with root permissions if possible. If you
102 connect successfully the cable modem interface will come up and you'll see a
103 driver message like this at the console:
105 cm0: sb1000 at (0x110,0x310), csn 1, S/N 0x2a0d16d8, IRQ 11.
106 sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)
108 The "ifconfig" command should show two new interfaces, ppp0 and cm0.
109 The command "cmconfig cm0" will give you information about the cable modem
110 interface.
112 10.) Try pinging a site via `ping -c 5 www.yahoo.com', for example. You should
113 see packets received.
115 11.) If you can't get site names (like www.yahoo.com) to resolve into
116 IP addresses (like, be sure your /etc/resolv.conf file
117 has no syntax errors and has the right nameserver IP addresses in it.
118 If this doesn't help, try something like `ping -c 5' to
119 see if the networking is running but the DNS resolution is where the
120 problem lies.
122 12.) If you still have problems, go to the support web sites mentioned above
123 and read the information and documentation there.
125 -----------------------------------------------------------------------------
127 Common problems:
129 1.) Packets go out on the ppp0 interface but don't come back on the cm0
130 interface. It looks like I'm connected but I can't even ping any
131 numerical IP addresses. (This happens predominantly on Debian systems due
132 to a default boot-time configuration script.)
134 Solution -- As root `echo 0 > /proc/sys/net/ipv4/conf/cm0/rp_filter' so it
135 can share the same IP address as the ppp0 interface. Note that this
136 command should probably be added to the /etc/ppp/cablemodem script
137 *right*between* the "/sbin/ifconfig" and "/sbin/cmconfig" commands.
138 You may need to do this to /proc/sys/net/ipv4/conf/ppp0/rp_filter as well.
139 If you do this to /proc/sys/net/ipv4/conf/default/rp_filter on each reboot
140 (in rc.local or some such) then any interfaces can share the same IP
141 addresses.
143 2.) I get "unresolved symbol" error messages on executing `insmod sb1000.o'.
145 Solution -- You probably have a non-matching kernel source tree and
146 /usr/include/linux and /usr/include/asm header files. Make sure you
147 install the correct versions of the header files in these two directories.
148 Then rebuild and reinstall the kernel.
150 3.) When isapnp runs it reports an error, and my SB1000 card isn't working.
152 Solution -- There's a problem with later versions of isapnp using the "(CHECK)"
153 option in the lines that allocate the two I/O addresses for the SB1000 card.
154 This first popped up on RH 6.0. Delete "(CHECK)" for the SB1000 I/O addresses.
155 Make sure they don't conflict with any other pieces of hardware first! Then
156 rerun isapnp and go from there.
158 4.) I can't execute the /etc/ppp/ppp@gi-on file.
160 Solution -- As root do `chmod ug+x /etc/ppp/ppp@gi-on'.
162 5.) The firewall script isn't working (with 2.2.x and higher kernels).
164 Solution -- Use the ipfwadm2ipchains script referenced above to convert the
165 /etc/ppp/firewall script from the deprecated ipfwadm commands to ipchains.
167 6.) I'm getting *tons* of firewall deny messages in the /var/kern.log,
168 /var/messages, and/or /var/syslog files, and they're filling up my /var
169 partition!!!
171 Solution -- First, tell your ISP that you're receiving DoS (Denial of Service)
172 and/or portscanning (UDP connection attempts) attacks! Look over the deny
173 messages to figure out what the attack is and where it's coming from. Next,
174 edit /etc/ppp/cablemodem and make sure the ",nobroadcast" option is turned on
175 to the "cmconfig" command (uncomment that line). If you're not receiving these
176 denied packets on your broadcast interface (IP address xxx.yyy.zzz.255
177 typically), then someone is attacking your machine in particular. Be careful
178 out there....
180 7.) Everything seems to work fine but my computer locks up after a while
181 (and typically during a lengthy download through the cable modem)!
183 Solution -- You may need to add a short delay in the driver to 'slow down' the
184 SURFboard because your PC might not be able to keep up with the transfer rate
185 of the SB1000. To do this, it's probably best to download Franco's
186 sb1000-1.1.2.tar.gz archive and build and install sb1000.o manually. You'll
187 want to edit the 'Makefile' and look for the 'SB1000_DELAY'
188 define. Uncomment those 'CFLAGS' lines (and comment out the default ones)
189 and try setting the delay to something like 60 microseconds with:
190 '-DSB1000_DELAY=60'. Then do `make' and as root `make install' and try
191 it out. If it still doesn't work or you like playing with the driver, you may
192 try other numbers. Remember though that the higher the delay, the slower the
193 driver (which slows down the rest of the PC too when it is actively
194 used). Thanks to Ed Daiga for this tip!
196 -----------------------------------------------------------------------------
198 Credits: This README came from Franco Venturi's original README file which is
199 still supplied with his driver .tar.gz archive. I and all other sb1000 users
200 owe Franco a tremendous "Thank you!" Additional thanks goes to Carl Patten
201 and Ralph Bonnell who are now managing the Linux SB1000 web site, and to
202 the SB1000 users who reported and helped debug the common problems listed
203 above.
206 Clemmitt Sigler
207 csigler@vt.edu