[linux-usb-devel] Dynamic USB buffer sizes (Was: Option driver enhancement)
indan at nul.nu
Thu Oct 4 11:49:46 UTC 2007
On Thu, October 4, 2007 12:43, Matthias Urlichs wrote:
> Indan Zupancic:
>> E.g. some mechanism where the buffer size and buffer count is chosen
>> dynamically depending on how fast the device turns out to be, and some
>> latency constraints.
> You can't measure how fast the device is. If you send too much too fast,
> you simply get dropped or mangled data at the other end of the data link;
> if you're doing PPP, completely wedging the channel, requiring a
> reconnect or even a powercycle of the card to recover, is not at all
> unlikely in my experience. :-(
That's bad. If the device can't give feedback, but breaks when sent too
much data then the feedback should come from somewhere else. The
dynamic buffer idea assumed that the device would limit the bandwidth
by itself when it can't go faster.
But this seems more problematic than just sizing the buffers right, it
sounds like things can go wrong if you sent two packets quickly after
each other (or does it only go wrong if the buffer on the device is full?).
If it's more delicate you might want to use (existing) QoS stuff.
More information about the devel