From owner-freebsd-current@FreeBSD.ORG Wed Jul 7 19:20:42 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 2DFCC16A50A for ; Wed, 7 Jul 2004 19:20:42 +0000 (GMT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB38F43D3F for ; Wed, 7 Jul 2004 19:20:41 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc12) with ESMTP id <2004070719203901200t958fe>; Wed, 7 Jul 2004 19:20:40 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA81339; Wed, 7 Jul 2004 12:20:37 -0700 (PDT) Date: Wed, 7 Jul 2004 12:20:35 -0700 (PDT) From: Julian Elischer To: ticso@cicely.de In-Reply-To: <20040707095949.GF12877@cicely12.cicely.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Poul-Henning Kamp 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 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 19:20:42 -0000 On Wed, 7 Jul 2004, Bernd Walter wrote: > On Wed, Jul 07, 2004 at 11:16:14AM +0200, Poul-Henning Kamp wrote: > > In message <20040707091311.GE12877@cicely12.cicely.de>, Bernd Walter writes: > > >On Tue, Jul 06, 2004 at 04:32:28PM -0700, Julian Elischer wrote: > > > > >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. > > > > I would consider ugen to be a primary candidate to use physio like > > I belive scsi-tape drives do ? > > I don't really know the points between physio and the current way. > The story with USB bulk transfers is that legal transfers can have a > data size of even down to 0 bytes and a lot a typical clients do > small transfers - just depends on the designers needs. I might add that the INTERRUPT mode code for ugen does things in turn of 128 byte chunks, but for USB2 devices it is now permissable to use chunks of up to 1024 bytes. we should probably make that adjustable depending on whether the device is a USB 2 one or not.. Ther eis a lot to be done here to make this code really USB-2 code as opposed to USB-2 "aware" code. > In the current code it seems that short transfers are already broken > at least I don't see where short transfers can break out of the while > loop so the knowledge about the real transfers size is lost. > Under normal conditions we should break out on short transfers and > return the so far transfered size. > We should also be able to do interleaving some day. > If you think that the requirements wouldn't collide with physio then > OK. Physio simply transforms a transfer into user space in a way that the transfers don't require a buffer, but rather, use the user's buffer pages as the direct target of the transfer. You need to supply a "strategy" routine that does both read and write to the mapped buffers on behalf of physio and it tends to use system "buf" structs. > > Nevertheless I see ugen more as a quick and dirty way to test drive a > device from userland with all it's great debugging capabilities before > writing a specific kernel driver. > The requirement that ugen has to be generic is often bad for > performance sensitive applications. Ugen is used in production all over the place where people have to used devices there is no specific support for, and where there is no kernel expertise. > > -- > B.Walter BWCT http://www.bwct.de > bernd@bwct.de info@bwct.de > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >