Date: Thu, 1 Sep 2005 15:31:36 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: "Eygene A. Ryabinkin" <freebsd@rea.mbslab.kiae.ru> Cc: Scott Long <scottl@samsco.org>, hackers@freebsd.org, Eugene Grosbein <eugen@kuzbass.ru>, Ian Dowse <iedowse@iedowse.com>, freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports Message-ID: <20050901133136.GL3267@cicely12.cicely.de> In-Reply-To: <20050901084421.GA840@rea.mbslab.kiae.ru> References: <200508302009.aa99975@nowhere.iedowse.com> <43160334.5000100@samsco.org> <43160943.6030400@samsco.org> <20050901084421.GA840@rea.mbslab.kiae.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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@bwct.de info@bwct.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050901133136.GL3267>