USB_SG_WAIT(9) USB Core APIs USB_SG_WAIT(9)NAME
usb_sg_wait - synchronously execute scatter/gather request
void usb_sg_wait(struct usb_sg_request * io);
request block handle, as initialized with usb_sg_init. some fields become accessible when this call returns.
This function blocks until the specified I/O operation completes. It leverages the grouping of the related I/O requests to get good
transfer rates, by queueing the requests. At higher speeds, such queuing can significantly improve USB throughput.
There are three kinds of completion for this function. (1) success, where io->status is zero. The number of io->bytes transferred is as
requested. (2) error, where io->status is a negative errno value. The number of io->bytes transferred before the error is usually less than
requested, and can be nonzero. (3) cancellation, a type of error with status -ECONNRESET that is initiated by usb_sg_cancel.
When this function returns, all memory allocated through usb_sg_init or this call will have been freed. The request block parameter may
still be passed to usb_sg_cancel, or it may be freed. It could also be reinitialized and then reused.
DATA TRANSFER RATES
Bulk transfers are valid for full or high speed endpoints. The best full speed data rate is 19 packets of 64 bytes each per frame, or 1216
bytes per millisecond. The best high speed data rate is 13 packets of 512 bytes each per microframe, or 52 KBytes per millisecond.
The reason to use interrupt transfers through this API would most likely be to reserve high speed bandwidth, where up to 24 KBytes per
millisecond could be transferred. That capability is less useful for low or full speed interrupt endpoints, which allow at most one packet
per millisecond, of at most 8 or 64 bytes (respectively).
It is not necessary to call this function to reserve bandwidth for devices under an xHCI host controller, as the bandwidth is reserved when
the configuration or interface alt setting is selected.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 USB_SG_WAIT(9)
Check Out this Related Man Page
USB_SG_INIT(9) USB Core APIs USB_SG_INIT(9)NAME
usb_sg_init - initializes scatterlist-based bulk/interrupt I/O request
int usb_sg_init(struct usb_sg_request * io, struct usb_device * dev, unsigned pipe, unsigned period, struct scatterlist * sg, int nents,
size_t length, gfp_t mem_flags);
request block being initialized. until usb_sg_wait returns, treat this as a pointer to an opaque block of memory,
the usb device that will send or receive the data
endpoint "pipe" used to transfer the data
polling rate for interrupt endpoints, in frames or (for high speed endpoints) microframes; ignored for bulk
how many entries in the scatterlist
how many bytes to send from the scatterlist, or zero to send every byte identified in the list.
SLAB_* flags affecting memory allocations in this call
Returns zero for success, else a negative errno value. This initializes a scatter/gather request, allocating resources such as I/O mappings
and urb memory (except maybe memory used by USB controller drivers).
The request must be issued using usb_sg_wait, which waits for the I/O to complete (or to be canceled) and then cleans up all resources
allocated by usb_sg_init.
The request may be canceled with usb_sg_cancel, either before or after usb_sg_wait is called.
COPYRIGHT Kernel Hackers Manual 2.6. July 2010 USB_SG_INIT(9)
I have a 10Gbps network link connecting two machines A and B. I want to transfer 20GB data from A to B using TCP. With default setting, I can use 50% bandwidth. How to improve the throughput? Is there any way to make throughput as close to 10Gbps as possible? thanks~ :) (3 Replies)
I would like to check with grep in this configuration file:
"...something..." : true,
"alt-speed-enabled" (the third line of the file) is setted to... (2 Replies)
Things like this are teaching me a greater appreciation for network time...
The huge gap between the speed of a satellite connection and its tiny bandwidth allowance means either being completely draconian or having to chide people to not abuse it all the time. We're somewhere inbetween, if a... (3 Replies)