Commit c1f4a51d authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB: Ignore URB_NO_INTERRUPT flag in UHCI

Following a suggestion of David Brownell's I have decided to remove
support for the URB_NO_INTERRUPT flag in the UHCI driver.  The overall
effect of the flag is to reduce the number of interrupts, thereby
improving throughput somewhat while increasing the duration of the
remaining IRQ handlers quite a lot (i.e., increasing interrupt variance).
So I think we're better off without it.  Mind you, this is all in the
absence of any firm measurements.

A common case where this will come up is during usb-storage bulk
transfers.  Such transfers are generally divided into scatter-gather
components each corresponding to a single URB and transferring one memory
page (4 KB).  While generating an interrupt for each one is a little
faster than ideal -- about every 3 ms -- it's better than waiting until 64
KB has been transferred and there are 1024 individual TDs to clean up
during the IRQ.
parent 16443d6c
......@@ -1034,8 +1034,12 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, struct urb
usb_pipeout(urb->pipe));
}
/* Set the flag on the last packet */
if (!(urb->transfer_flags & URB_NO_INTERRUPT))
/* Set the interrupt-on-completion flag on the last packet.
* A more-or-less typical 4 KB URB (= size of one memory page)
* will require about 3 ms to transfer; that's a little on the
* fast side but not enough to justify delaying an interrupt
* more than 2 or 3 URBs, so we will ignore the URB_NO_INTERRUPT
* flag setting. */
td->status |= cpu_to_le32(TD_CTRL_IOC);
qh = uhci_alloc_qh(uhci, urb->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment