From owner-freebsd-current@FreeBSD.ORG Wed Jul 7 09:14:27 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C721A16A4CF for ; Wed, 7 Jul 2004 09:14:27 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id E932B43D2D for ; Wed, 7 Jul 2004 09:14:26 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) i679EHaI088479 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 7 Jul 2004 11:14:20 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id i679DEUi004435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Jul 2004 11:13:14 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id i679DD6O021627; Wed, 7 Jul 2004 11:13:13 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id i679DCJa021626; Wed, 7 Jul 2004 11:13:12 +0200 (CEST) (envelope-from ticso) Date: Wed, 7 Jul 2004 11:13:12 +0200 From: Bernd Walter To: Julian Elischer Message-ID: <20040707091311.GE12877@cicely12.cicely.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on cicely12.cicely.de cc: mycroft@netbsd.org cc: FreeBSD current users Subject: Re: speeding up ugen by an order of magnitude. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 09:14:28 -0000 On Tue, Jul 06, 2004 at 04:32:28PM -0700, Julian Elischer wrote: > > So, we had a device that we access through ugen. > > the manufacturer said we should get the transaction in 3 seconds > and wiindows and linux did, but FreeBSD got it in 15 seconds. > I suspect since the code is the same, NetBSD would get the same result.. > > lokking at it I noticed that ugen does everything in 1K bits, > which is ok for USB1, but a bit silly for USB2. Mmm - 128k is very big - consider that you may have hundrets of ugen bulk pipes open - all with outstanding reads. This would eat up kernel memory quite fast. The problem is lost bus time between finishing an xfer and issuing the next one - consider that part of this lost time is OS dependend latency and in fact might be limited to FreeBSD. What about those options: - limit the allocated memory to the user request so we don't take the whole 128k if not reuired. - Do interleaving with 2 or more xfers if the read request is known to take more xfers. Naturally the situation with bulk writes is the same. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de