From owner-freebsd-current@FreeBSD.ORG Tue Jun 8 09:29: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 55A9F16A4CE for ; Tue, 8 Jun 2004 09:29:03 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (80-219-172-121.dclient.hispeed.ch [80.219.172.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7889243D5D for ; Tue, 8 Jun 2004 09:29:01 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [2002:50db:ac79:0:250:daff:fe5a:2107]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id i589Sq601629 verified NO) for ; Tue, 8 Jun 2004 11:28:58 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.11.6/FNORD) id i589Spl01628; Tue, 8 Jun 2004 11:28:51 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Tue, 8 Jun 2004 11:28:51 +0200 (CEST) Message-Id: <200406080928.i589Spl01628@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL From: Barry Bouwsma To: current@freebsd.org References: <200405232109.aa46210@salmon.maths.tcd.ie> X-Mailman-Approved-At: Tue, 08 Jun 2004 12:16:11 +0000 Subject: Re: USB patch for better bus_dma and detachment support 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: Tue, 08 Jun 2004 09:29:03 -0000 [drop the above ipv6-only address that only sometimes works from the recipients and I'll catch up later from the archives, thanks] > http://people.freebsd.org/~iedowse/usb.diff > that attempts to begin addressing a number of problems with our > current USB code: > > o All data buffers were allocated using bus_dma as physically > contiguous memory. All transfers involve a memory copy to/from > these contiguous buffers, and the contiguous memory is never > freed. Use of these buffers is also inefficient, so low-memory > systems tend to quickly run out of usable physical memory. Apologies for the lateness of this reply, but if you're interested, I've had great success with this patch, apparently helping a few annoying problems I've had. I've massaged this patch to work against my -stable (with select source files derived from -current), and so far I no longer see the problems that had occurred regularly: :-) With my uhci controller, if I waited to mount and use a umass device until other programs had snarfed all the system memory, I'd get BBB timeouts when trying to access the device from which I could never recover. :-( My ehci controller, with certain devices, gave a `need data toggle' kernel message during access which either slowed access to a crawl, or inhibited any disk access, or could result in a panic. This problem still does occur within hours of use if it occurs, but superficially it seems to be better than before. The first problem has failed to recur in limited testing after applying your patch, so it's a significant improvement for me. So far, I appear to have stable operation of my USB storage devices with my hardware for a change, though time will tell if I just haven't yet triggered the above problems. thanks, and sorry for the delay in this feedback. if this patch has not yet been written to apply against 4.x (only a few trivial changes appear needed) during the time I've been offline, I could be strong-armed into posting needed changes to make it work with selected source. barry bouwsma