Re: [linux-usb-devel] USB performance bug since kernel 2.6.13 (CRITICAL???)
From: David Brownell
Date: Fri Oct 13 2006 - 19:33:38 EST
On Friday 13 October 2006 12:31 pm, Open Source wrote:
>
> It seems like the unlinking of completed URBs
> happens asynchronously on a timer. This is a
> surprise to me since I thought this was happening
> on an IRQ from the host controller. But if what I'm
> surmising is correct it would explain everything
> I am seeing.
You didn't say what EHCI controller you're using.
The original reason for that timer was specifically
to handle bugs in VIA silicon: that won't always issue
all of the IRQs it's supposed to. Specifically the IAA
IRQ would never arrive, leading to unlink operations
wedging.
Later on that timer got overloaded (and hence it got
to be a bit of a mess) with two other tasks:
(a) deducing that an endpoint had been idle long enough
to take off the ring of active control/bulk queues,
which is what ensures that an idle controller isn't
wasting memory bandwidth by doing DMA all the time.
(It turns out to be a Bad Idea to take idle endpoints
off that ring the instant they become idle, since they
will as a rule be reused very quickly ... so immediate
removal slows things down a lot. Plus it chases an
annoying number of races between driver and controller.)
(b) being a general I/O watchdog, since there were some
other (rare) cases where IRQs would appear to get lost
In short, except for (a) the only reason I know of
that changing HZ should affect system performance is
IRQ lossage ... of which the primary reason has always
been strange behavior from VIA controllers.
- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/