Low umass performance with USB 2.0 ports
Bernd Walter
ticso at cicely12.cicely.de
Thu Sep 1 13:31:55 GMT 2005
On Thu, Sep 01, 2005 at 12:44:21PM +0400, Eygene A. Ryabinkin wrote:
> > Actually, I just peeked inside the Linux EHCI code and it does a dummy
> > read immediately after writing to the status register:
> >
> > /* clear (just) interrupts */
> > writel (status, &ehci->regs->status);
> > readl (&ehci->regs->command); /* unblock posted write */
> >
> > I wonder if that's the whole trick here. Would someone be willing to
> > try the attached patch instead of the one that Ian posted?
> Yes, that solved my problem. But the patch (for 5.x) uses different line
> numbers:
> -----
> --- /sys/dev/usb/ehci.c.orig Thu Sep 1 10:59:51 2005
> +++ /sys/dev/usb/ehci.c Thu Sep 1 10:48:59 2005
> @@ -580,6 +580,7 @@
> return (0);
>
> EOWRITE4(sc, EHCI_USBSTS, intrs); /* Acknowledge */
> + EOREAD4(sc, EHCI_USBCMD); /* Flush posted writes on PCI */
> sc->sc_bus.intr_context++;
> sc->sc_bus.no_intrs++;
> if (eintrs & EHCI_STS_IAA) {
> -----
> Apart from this the patch works: the writing process still spends much time
> in the wdrain state, but no stalls occurs.
>
> Just a remark: my USB 2.0 controller chip is made by NEC, not VIA.
>
> For a FAT curiosity: FAT 32 gives 700K/sec and FAT 16 -- 3 Mb/sec.
FAT32 vs. FAT16 shouldn't be a difference, but the smaller cluster
sizes that you usually get with FAT32 decrease the average transfer
size.
Basicly you can get around 500-1000 transactions per second over USB,
unless interleaving multiple transactions is done.
Since msdosfs does no aggregation you can end up with e.g. 512 Byte
transactions.
700kB/s points to an FS with 2k cluster size.
Currently I'm unshure if umass allows interleaving transactions, but
your numbers makes me believe that it does not.
--
B.Walter BWCT http://www.bwct.de
bernd at bwct.de info at bwct.de
More information about the freebsd-usb
mailing list