[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 5/5] usb_debug: EXPERIMENTAL - poll hcd device to force writes
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?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-05-07 16:53    [W:0.055 / U:3.272 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site