From owner-freebsd-current@FreeBSD.ORG Thu Jul 8 06:16:03 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 2F9ED16A4CE; Thu, 8 Jul 2004 06:16:03 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71B7643D5C; Thu, 8 Jul 2004 06:16:00 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.1.116] (CPE000625df7014-CM00803785bf66.cpe.net.cable.rogers.com [69.193.111.74]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i686KYB4005363; Thu, 8 Jul 2004 00:20:35 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <40ECE675.2090307@samsco.org> Date: Thu, 08 Jul 2004 00:15:17 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040702 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: "Charles M. Hannum" cc: Poul-Henning Kamp cc: Scott Long cc: FreeBSD current users cc: ticso@cicely.de 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: Thu, 08 Jul 2004 06:16:03 -0000 Julian Elischer wrote: > > On Wed, 7 Jul 2004, Scott Long wrote: > > >>On Wed, 7 Jul 2004, Poul-Henning Kamp wrote: >> >>>In message <200407072129.15095.mycroft@netbsd.org>, "Charles M. Hannum" writes: >>> >>>>On Wednesday 07 July 2004 20:46, Charles M. Hannum wrote: >>>> >>>>>1) You'll need to add an interface for assigning pipes for read and write, >>>>>since there may be more than just bulk pipes (and may be more than one bulk >>>>>pipe in each direction), and we only have have device node to work with. >>>> >>>>Seems I misspoke there. That part looks fine. >>>> >>>>I think you're going to be screwed by the buffer alignment, though. This also >>>>causes some issues with umass if you're not using a bounce buffer. >>> >>>We've already had that issue with ATA for the b�rked Geode controller: >>>physio does nothing for alignment and relies on userland doing something >>>sensible. >>> >>>I think this is pretty reasonable for the kind of hardware-near >>>work that physio is usually employed in (including if we use it for >>>ugen). >>> >>>Obviously, if the alignment is not OK, EINVAL should be returned, >>>and that means that the driver should explicitly check the alignment. >> >>Note that busdma can handle alignment now for loaded buffers by using >>bounce pages. > > > Since we have a relatively highly weighted priority on keeping this > code common with teh NetBSD version, how does that go for NetBSD? > > > >>Scott > > > I honestly don't know if NetBSD busdma honors alignment when loading segments. However, I believe that our usb code has the busdma functionality completely broken out from the common code (in usb_mem.c, IIRC), so it's of little consequence to portability. I was going to mention that different semantics of bus_dmamap_load() between FreeBSD and NetBSD might still cause problems here, but it looks like our usb code still allocates static busdma buffers and copies the packets in/out of these. Wasn't this fixed a while back? Scott