ia64/linux-2.6.18-xen.hg

view Documentation/usb/error-codes.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
1 Revised: 2004-Oct-21
3 This is the documentation of (hopefully) all possible error codes (and
4 their interpretation) that can be returned from usbcore.
6 Some of them are returned by the Host Controller Drivers (HCDs), which
7 device drivers only see through usbcore. As a rule, all the HCDs should
8 behave the same except for transfer speed dependent behaviors and the
9 way certain faults are reported.
12 **************************************************************************
13 * Error codes returned by usb_submit_urb *
14 **************************************************************************
16 Non-USB-specific:
18 0 URB submission went fine
20 -ENOMEM no memory for allocation of internal structures
22 USB-specific:
24 -ENODEV specified USB-device or bus doesn't exist
26 -ENOENT specified interface or endpoint does not exist or
27 is not enabled
29 -ENXIO host controller driver does not support queuing of this type
30 of urb. (treat as a host controller bug.)
32 -EINVAL a) Invalid transfer type specified (or not supported)
33 b) Invalid or unsupported periodic transfer interval
34 c) ISO: attempted to change transfer interval
35 d) ISO: number_of_packets is < 0
36 e) various other cases
38 -EAGAIN a) specified ISO start frame too early
39 b) (using ISO-ASAP) too much scheduled for the future
40 wait some time and try again.
42 -EFBIG Host controller driver can't schedule that many ISO frames.
44 -EPIPE Specified endpoint is stalled. For non-control endpoints,
45 reset this status with usb_clear_halt().
47 -EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable
48 in the current interface altsetting.
49 (b) ISO packet is larger than the endpoint maxpacket.
50 (c) requested data transfer length is invalid: negative
51 or too large for the host controller.
53 -ENOSPC This request would overcommit the usb bandwidth reserved
54 for periodic transfers (interrupt, isochronous).
56 -ESHUTDOWN The device or host controller has been disabled due to some
57 problem that could not be worked around.
59 -EPERM Submission failed because urb->reject was set.
61 -EHOSTUNREACH URB was rejected because the device is suspended.
64 **************************************************************************
65 * Error codes returned by in urb->status *
66 * or in iso_frame_desc[n].status (for ISO) *
67 **************************************************************************
69 USB device drivers may only test urb status values in completion handlers.
70 This is because otherwise there would be a race between HCDs updating
71 these values on one CPU, and device drivers testing them on another CPU.
73 A transfer's actual_length may be positive even when an error has been
74 reported. That's because transfers often involve several packets, so that
75 one or more packets could finish before an error stops further endpoint I/O.
78 0 Transfer completed successfully
80 -ENOENT URB was synchronously unlinked by usb_unlink_urb
82 -EINPROGRESS URB still pending, no results yet
83 (That is, if drivers see this it's a bug.)
85 -EPROTO (*, **) a) bitstuff error
86 b) no response packet received within the
87 prescribed bus turn-around time
88 c) unknown USB error
90 -EILSEQ (*, **) a) CRC mismatch
91 b) no response packet received within the
92 prescribed bus turn-around time
93 c) unknown USB error
95 Note that often the controller hardware does not
96 distinguish among cases a), b), and c), so a
97 driver cannot tell whether there was a protocol
98 error, a failure to respond (often caused by
99 device disconnect), or some other fault.
101 -ETIMEDOUT (**) No response packet received within the prescribed
102 bus turn-around time. This error may instead be
103 reported as -EPROTO or -EILSEQ.
105 Note that the synchronous USB message functions
106 also use this code to indicate timeout expired
107 before the transfer completed.
109 -EPIPE (**) Endpoint stalled. For non-control endpoints,
110 reset this status with usb_clear_halt().
112 -ECOMM During an IN transfer, the host controller
113 received data from an endpoint faster than it
114 could be written to system memory
116 -ENOSR During an OUT transfer, the host controller
117 could not retrieve data from system memory fast
118 enough to keep up with the USB data rate
120 -EOVERFLOW (*) The amount of data returned by the endpoint was
121 greater than either the max packet size of the
122 endpoint or the remaining buffer size. "Babble".
124 -EREMOTEIO The data read from the endpoint did not fill the
125 specified buffer, and URB_SHORT_NOT_OK was set in
126 urb->transfer_flags.
128 -ENODEV Device was removed. Often preceded by a burst of
129 other errors, since the hub driver does't detect
130 device removal events immediately.
132 -EXDEV ISO transfer only partially completed
133 look at individual frame status for details
135 -EINVAL ISO madness, if this happens: Log off and go home
137 -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb
139 -ESHUTDOWN The device or host controller has been disabled due
140 to some problem that could not be worked around,
141 such as a physical disconnect.
144 (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate
145 hardware problems such as bad devices (including firmware) or cables.
147 (**) This is also one of several codes that different kinds of host
148 controller use to to indicate a transfer has failed because of device
149 disconnect. In the interval before the hub driver starts disconnect
150 processing, devices may receive such fault reports for every request.
154 **************************************************************************
155 * Error codes returned by usbcore-functions *
156 * (expect also other submit and transfer status codes) *
157 **************************************************************************
159 usb_register():
160 -EINVAL error during registering new driver
162 usb_get_*/usb_set_*():
163 usb_control_msg():
164 usb_bulk_msg():
165 -ETIMEDOUT Timeout expired before the transfer completed.
166 In the future this code may change to -ETIME,
167 whose definition is a closer match to this sort
168 of error.