Am Donnerstag, 7. Mai 2009 16:27:12 schrieb Alan Stern: > A more interesting question is whether to deallocate URBs as they > complete or to reuse them. A simple approach (which Oliver no doubt > has already considered) is: > > write_complete(urb): > if (write_urb->transfer_length > 0) > submit(write_urb); > write_urb = urb; > else > urb_free(urb); It seems to me that if I don't know the true speed of a device I should always keep two URBs in flight. That is if we decide that the generic implementation needs to be trimmed for extreme performance. Two URBs ensure that the finishing of one URB can trigger new data and an URB is still ready to fill the gap. While two URBs are in flight the driver should concentrate on filling large buffers. If we want to get fancy we'd even consider interrupt mitigation here. Will the tty layer make large writes if it can? I always assumed that the use case that cares about performances is ppp and will deliver network packets if it has enough write room. Is that always true? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html