From owner-freebsd-hackers Sat Jan 19 17:40:22 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from androcles.com (androcles.com [204.57.240.10]) by hub.freebsd.org (Postfix) with ESMTP id 6B96737B400 for ; Sat, 19 Jan 2002 17:40:08 -0800 (PST) Received: (from alex@localhost) by androcles.com (8.11.6/8.11.3) id g0K1dv621605; Sat, 19 Jan 2002 17:39:57 -0800 (PST) (envelope-from alex) Message-Id: <200201200139.g0K1dv621605@androcles.com> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020116110612.B16252@genius.tao.org.uk> Date: Sat, 19 Jan 2002 17:39:56 -0800 (PST) From: "Duane H. Hesser" To: Josef Karthauser Subject: Re: USB UHCI speed issue ? Cc: hackers@FreeBSD.ORG, Ulf Zimmermann Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 16-Jan-02 Josef Karthauser wrote: > On Tue, Jan 15, 2002 at 05:50:45PM -0800, Ulf Zimmermann wrote: > >> Has this been fixed in -CURRENT ? And if so, can someone point me >> at what files I can try to get onto -STABLE to get a higher speed >> out ? I am working on an application and 64,000/sec is slow to test >> things. > > I've been doing some work in -current to sychronise our USB stack with > NetBSD's. If you can identify a set of commits in NetBSD that fixed > this problem I'll happily take a look for you. > > Joe I can confirm the problem, and point you to a message in the "current" archives (Dec 15) which contains a simple 3 or 4 line patch to uhui.c. The message, authored by Andrew Gordon, may be found at http://www.FreeBSD.org/cgi/getmsg.cgi?fetch=775757+780830+/usr/local/www/db/text/2001/freebsd-current/20011216.freebsd-curren t or, if you prefer, search the "current" archive for "uhci and driver and marker and terminate". The patch may not provide the same fix that the latest Netbsd sources provide, but it might indicate where to look. It improves transfer speed for my Nikon 990 (using 'photopc' with USB support and the 'ugen' driver), although it does not seem to do everything that could be done. The following numbers show the "before" and "after" numbers for FreeBSD (4.4, last cvsupped Oct 22) and finally for RedHat Linux 7.2 (2.4.7 something kernel). These are from a 'photopc' locally hacked up to report transfer times. ========================================= FreeBSD before patch: chevy% photopc image 1-5 . Downloading 1-5 from folder /DCIM/100NIKON image 1: 1143620 of 1143620 taken Tue Dec 25 08:47:24 2001 PST file "./IMG_1298=2001_12_25-08_47_24-003.jpg" 21.577 seconds, 51.7596 KB/sec image 2: 1176877 of 1176877 taken Tue Dec 25 08:48:46 2001 PST file "./IMG_1299=2001_12_25-08_48_46-002.jpg" 22.245 seconds, 51.6653 KB/sec image 3: 1180915 of 1180915 taken Tue Dec 25 08:48:57 2001 PST file "./IMG_1300=2001_12_25-08_48_57-002.jpg" 22.344 seconds, 51.6128 KB/sec image 4: 859381 of 859381 taken Tue Dec 25 08:49:15 2001 PST file "./IMG_1301=2001_12_25-08_49_15-002.jpg" 16.270 seconds, 51.582 KB/sec image 5: 1145191 of 1145191 taken Tue Dec 25 08:49:32 2001 PST file "./IMG_1302=2001_12_25-08_49_32-001.jpg" 21.608 seconds, 51.7563 KB/sec ========================================= *Note* that everything I've ever downloaded from the camera (since the end of July) has come down at 51.5 +/- a couple of tenths. Numbers were identical under Netbsd 1.5. ========================================= FreeBSD AFTER patch: chevy% photopc image 1-5 /tmp Downloading 1-5 from folder /DCIM/100NIKON image 1: 1143620 of 1143620 taken Tue Dec 25 08:47:24 2001 PST file "/tmp/IMG_1298=2001_12_25-08_47_24-001.jpg" 4.910 seconds, 227.458 KB/sec image 2: 1176877 of 1176877 taken Tue Dec 25 08:48:46 2001 PST file "/tmp/IMG_1299=2001_12_25-08_48_46.jpg" 5.048 seconds, 227.673 KB/sec image 3: 1180915 of 1180915 taken Tue Dec 25 08:48:57 2001 PST file "/tmp/IMG_1300=2001_12_25-08_48_57.jpg" 5.086 seconds, 226.747 KB/sec image 4: 859381 of 859381 taken Tue Dec 25 08:49:15 2001 PST file "/tmp/IMG_1301=2001_12_25-08_49_15.jpg" 3.705 seconds, 226.515 KB/sec image 5: 1145191 of 1145191 taken Tue Dec 25 08:49:32 2001 PST file "/tmp/IMG_1302=2001_12_25-08_49_32.jpg" 4.986 seconds, 224.298 KB/sec ========================================= RedHat Linux 7.2 bash-2.05# photopc image 1-5 . image 1: 1143620 of 1143620 taken Tue Dec 25 08:47:24 2001 file "./IMG_1298_122501-001.jpg" 4.282 seconds, 260.817 KB/sec image 2: 1176877 of 1176877 taken Tue Dec 25 08:48:46 2001 file "./IMG_1299_122501-001.jpg" 4.402 seconds, 261.084 KB/sec image 3: 1180915 of 1180915 taken Tue Dec 25 08:48:57 2001 file "./IMG_1300_122501-001.jpg" 4.425 seconds, 260.619 KB/sec image 4: 859381 of 859381 taken Tue Dec 25 08:49:15 2001 file "./IMG_1301_122501-001.jpg" 3.255 seconds, 257.831 KB/sec image 5: 1145191 of 1145191 taken Tue Dec 25 08:49:32 2001 file "./IMG_1302_122501-001.jpg" 4.281 seconds, 261.236 KB/sec bash-2.05# exit ========================================= Typical downloads under several Linuxes over the past year are 250KB.sec +/-10%. As you can see, the improvement with the patch is substantial, but there is a little room for more improvement. It would be nice to see this (or an improved) patch go in for 4.5, although it's probably a bit late for that to happen. I would be happy to test any related patches anyone might come up with. In the meantime, this patch seems unlikely to slam my CPU up against the wall, so I'll keep running it. It would be nice to see a permanent fix go in soon, though...I'd *really* hate to see another "Linux is faster than FreeBSD" thread here. And, BTW, "thanks" to Andrew Gordon for the patch (it's just what I wanted for Christmas). -------------- Duane H. Hesser dhh@androcles.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message