From owner-freebsd-usb@FreeBSD.ORG Fri Jan 28 07:58:03 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C792B1065670 for ; Fri, 28 Jan 2011 07:58:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 5B9E38FC0A for ; Fri, 28 Jan 2011 07:58:02 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=118a5bn0tGnRZbUa9ClBty6BTuM1bA5mUZqmf2RHYp4= c=1 sm=1 a=-lJg8f7At1MA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=CgqUDhbw9WEvZBDij74A:9 a=SKIRd9h-nnGp7Wwh1ha4MESXYK4A:4 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 80157031; Fri, 28 Jan 2011 08:58:00 +0100 From: Hans Petter Selasky To: "Daniel O'Connor" Date: Fri, 28 Jan 2011 08:58:05 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <9CF6C32F-E230-446B-94FC-C57F0F02B0E4@gsoft.com.au> <201101221433.23194.hselasky@c2i.net> <6AD22899-0B00-483D-A01E-786029A82C9F@gsoft.com.au> In-Reply-To: <6AD22899-0B00-483D-A01E-786029A82C9F@gsoft.com.au> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101280858.05077.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: libusb performance on 8.1 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2011 07:58:03 -0000 On Friday 28 January 2011 02:44:43 Daniel O'Connor wrote: > On 23/01/2011, at 24:03, Hans Petter Selasky wrote: > > You need to change the way you buffer the data. FreeBSD does not queue > > more than 2 URB's at any time, and the turnaround time varies from 1ms > > to 125us due to hardware IRQ restrictions. Linux queues up all it can > > get, which leads to other kind of problems. The current internal buffer > > limit is 16Kbyte 8000 times per second which gives a MAX of 128 > > MByte/second. > > How difficult would it be to increase this? Hi, For this kind of applications ISOCHRONOUS transfers should be used. Then you can have a double buffer guard in the range 1-56ms, regardless of the buffer size the hardware uses. You could also try an XHCI controller, because the BULK buffering is done differently there. > I obviously don't need any more > throughput, however my application is very sensitive to latency, as I am > reading out of a fairly small FIFO and if it fills up my entire run has to > be aborted. --HPS