From owner-freebsd-usb@FreeBSD.ORG Sat Sep 30 15:29:36 2006 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69C6E16A417 for ; Sat, 30 Sep 2006 15:29:36 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FBE143D46 for ; Sat, 30 Sep 2006 15:29:35 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so1241686nfc for ; Sat, 30 Sep 2006 08:29:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=YVZsJjDMwgCHJ6Mhc/t+ypmaMbzYSYHlnDdOYAQyb5X/zanlJ0ddqmJjD6AweGiW9wumI7HRXhayQBntk3ywcsZ2/7s0GMIl48UOrepqkdbSQDmvKt8barUiciP0BmWOlGeaUtdZGv0mNJ5qm9vonirf9N/UkzAXn/1ctlJZnDs= Received: by 10.49.55.13 with SMTP id h13mr6769412nfk; Sat, 30 Sep 2006 08:29:34 -0700 (PDT) Received: from roadrunner.q.local ( [85.180.147.118]) by mx.gmail.com with ESMTP id o53sm10361942nfa.2006.09.30.08.29.32; Sat, 30 Sep 2006 08:29:33 -0700 (PDT) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.8/8.13.6) with ESMTP id k8UFTTGG002669; Sat, 30 Sep 2006 17:29:29 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.8/8.13.6/Submit) id k8UFTSsO002668; Sat, 30 Sep 2006 17:29:28 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Sat, 30 Sep 2006 17:29:28 +0200 From: Ulrich Spoerlein To: Hans Petter Selasky Message-ID: <20060930152928.GB1441@roadrunner.q.local> Mail-Followup-To: Hans Petter Selasky , freebsd-usb@freebsd.org References: <200609171214.49165.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200609171214.49165.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: New UMASS driver available for testing X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Sep 2006 15:29:36 -0000 Hans Petter Selasky wrote: > Hi, > > I have finished the conversion of the UMASS driver to my new USB API. If you > have got a UMASS device laying around, and want to help the USB project, > please give the new driver a test. Well, it's been a time, but I finally got around to benchmarking you new driver. First of all, a diff of the dmesg from the old against your driver: --- usb.old Sat Sep 30 16:53:28 2006 +++ usb.hps Sat Sep 30 11:59:51 2006 @@ -1,8 +1,9 @@ Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. -FreeBSD 6.2-PRERELEASE #1: Tue Sep 19 21:57:47 CEST 2006 +FreeBSD 6.2-PRERELEASE #0: Tue Sep 19 19:34:50 CEST 2006 root@roadrunner:/vol/obj/usr/src/sys/ROADRUNNER +WARNING: WITNESS option enabled, expect reduced performance. acpi_alloc_wakeup_handler: can't alloc wake memory Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) M processor 1.50GHz (1495.16-MHz 686-class CPU) @@ -32,46 +33,17 @@ pci1: on pcib1 acpi_video0: port 0xc000-0xc0ff mem 0xd0000000-0xdfffffff,0xfcff0000-0xfcffffff irq 11 at device 0.0 on pci1 uhci0: port 0xbf80-0xbf9f irq 11 at device 29.0 on pci0 -uhci0: [GIANT-LOCKED] +uhci0: LegSup = 0x0000 usb0: on uhci0 -usb0: USB revision 1.0 -uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 -uhub0: 2 ports with 2 removable, self powered uhci1: port 0xbf40-0xbf5f irq 11 at device 29.1 on pci0 -uhci1: [GIANT-LOCKED] +uhci1: LegSup = 0x0000 usb1: on uhci1 -usb1: USB revision 1.0 -uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 -uhub1: 2 ports with 2 removable, self powered uhci2: port 0xbf20-0xbf3f irq 11 at device 29.2 on pci0 -uhci2: [GIANT-LOCKED] +uhci2: LegSup = 0x0000 usb2: on uhci2 -usb2: USB revision 1.0 -uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 -uhub2: 2 ports with 2 removable, self powered -ehci0: mem 0xf4fffc00-0xf4ffffff irq 11 at device 29.7 on pci0 -ehci0: [GIANT-LOCKED] +ehci0: mem 0xf4fffc00-0xf4ffffff irq 11 at device 29.7 on pci0 usb3: EHCI version 1.0 -usb3: companion controllers, 2 ports each: usb0 usb1 usb2 -usb3: on ehci0 -usb3: USB revision 2.0 -uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 -uhub3: 6 ports with 6 removable, self powered -uhub4: vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2 -uhub4: single transaction translator -uhub4: 4 ports with 4 removable, self powered -umass0: Co Ltd MP3 Flash Stick, rev 1.10/1.00, addr 3 -uhub5: vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 4 -uhub5: single transaction translator -uhub5: 4 ports with 4 removable, self powered -ukbd0: vendor 0x0430 PS/2 KB & MS, rev 1.00/0.01, addr 5, iclass 3/1 -kbd2 at ukbd0 -ums0: vendor 0x0430 PS/2 KB & MS, rev 1.00/0.01, addr 5, iclass 3/1 -ums0: 3 buttons. -ums1: Logitech USB Mouse, rev 1.10/4.00, addr 6, iclass 3/1 -ums1: 3 buttons and Z dir. -ucom0: vendor 0x067b product 0x2303, rev 1.10/2.02, addr 7 -ucom1: Prolific Technology Inc. USB-Serial Controller, rev 1.10/3.00, addr 8 +usb3: on ehci0 pcib2: at device 30.0 on pci0 pci_link1: BIOS IRQ 11 for 2.3.INTA is invalid pci2: on pcib2 @@ -93,7 +65,7 @@ fwip0: on firewire0 fwip0: Firewire address: 35:4f:c0:00:35:67:98:30 @ 0xfffe00000000, S400, maxrec 2048 dcons_crom0: on firewire0 -dcons_crom0: bus_addr 0x724e40 +dcons_crom0: bus_addr 0x730d60 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode @@ -130,20 +102,48 @@ sio0: type 8250 or not responding, console sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled -Timecounter "TSC" frequency 1495157868 Hz quality 800 +Timecounter "TSC" frequency 1495157270 Hz quality 800 Timecounters tick every 10.000 msec -ad0: 57231MB at ata0-master UDMA100 -acd0: DVDR at ata1-master UDMA33 +usb0: USB revision 1.0 +uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 127 +uhub0: 2 ports with 2 removable, self powered +usb1: USB revision 1.0 +uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 127 +uhub1: 2 ports with 2 removable, self powered +usb2: USB revision 1.0 +uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 127 +uhub2: 2 ports with 2 removable, self powered +usb3: USB revision 2.0 +uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 127 +uhub3: 6 ports with 6 removable, self powered +uhub4: Genesys USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 126 +uhub4: 4 ports with 4 removable, self powered +umass0: +umass0: SCSI over Bulk-Only; quirks = 0x0000 +umass0:1:0:-1: Attached to scbus1 +uhub5: Genesys USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 124 +uhub5: 4 ports with 4 removable, self powered +ukbd0: +kbd2 at ukbd0 +ums0: +ums0: 3 buttons and [XY] coordinates +ums1: +ums1: 3 buttons and [XYZ] coordinates +ucom0: Prolific PL2303 Serial (ATEN/IOGEAR UC232A), rev 1.10/2.02, addr 121 +uhub_explore: usb_new_device failed, error=USBD_SET_ADDR_FAILED +uhub5: device problem (USBD_SET_ADDR_FAILED), disabling port 4 da0 at umass-sim0 bus 0 target 0 lun 0 da0: < MP3 Flash Stick 1.00> Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 247MB (505856 512 byte sectors: 64H 32S/T 247C) +ad0: 57231MB at ata0-master UDMA100 +acd0: DVDR at ata1-master UDMA33 cd0 at ata1 bus 0 target 0 lun 0 cd0: <_NEC DVD_RW ND-5500A 1.51> Removable CD-ROM SCSI-0 device cd0: 33.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/ad0s4a Then I read from my crappy USB MP3 stick with blocksizes of 512, 4k, 32k, 256k and 2m. First the old UBS stack: 505856+0 records in 505856+0 records out 258998272 bytes transferred in 1896.377580 secs (136575 bytes/sec) dd if=/dev/da0 of=/dev/null bs=$i 0.20s user 3.12s system 0% cpu 31:36.47 total 63232+0 records in 63232+0 records out 258998272 bytes transferred in 830.936499 secs (311694 bytes/sec) dd if=/dev/da0 of=/dev/null bs=$i 0.06s user 0.37s system 0% cpu 13:50.95 total 7904+0 records in 7904+0 records out 258998272 bytes transferred in 701.837563 secs (369029 bytes/sec) dd if=/dev/da0 of=/dev/null bs=$i 0.00s user 0.07s system 0% cpu 11:41.85 total 988+0 records in 988+0 records out 258998272 bytes transferred in 692.533625 secs (373987 bytes/sec) dd if=/dev/da0 of=/dev/null bs=$i 0.00s user 0.03s system 0% cpu 11:32.55 total 123+1 records in 123+1 records out 258998272 bytes transferred in 692.605918 secs (373948 bytes/sec) dd if=/dev/da0 of=/dev/null bs=$i 0.00s user 0.04s system 0% cpu 11:32.62 total and the new stack 505856+0 records in 505856+0 records out 258998272 bytes transferred in 1830.640056 secs (141480 bytes/sec) dd if=/dev/da0 bs=$i of=/dev/null 0.25s user 12.25s system 0% cpu 30:30.66 total 63232+0 records in 63232+0 records out 258998272 bytes transferred in 780.638890 secs (331777 bytes/sec) dd if=/dev/da0 bs=$i of=/dev/null 0.03s user 1.54s system 0% cpu 13:00.66 total 7904+0 records in 7904+0 records out 258998272 bytes transferred in 651.638445 secs (397457 bytes/sec) dd if=/dev/da0 bs=$i of=/dev/null 0.01s user 0.27s system 0% cpu 10:51.66 total 988+0 records in 988+0 records out 258998272 bytes transferred in 642.196562 secs (403301 bytes/sec) dd if=/dev/da0 bs=$i of=/dev/null 0.00s user 0.13s system 0% cpu 10:42.21 total 123+1 records in 123+1 records out 258998272 bytes transferred in 642.206625 secs (403294 bytes/sec) dd if=/dev/da0 bs=$i of=/dev/null 0.00s user 0.13s system 0% cpu 10:42.22 total As you can see, performance increased by roughly 10%, but system time increased about 300% :( I hope this info was useful to you and am looking forward to seeing your reworked USB system hit the tree soon! Ulrich Spoerlein -- A: Yes. >Q: Are you sure? > >A: Because it reverses the logical flow of conversation. > >>Q: Why is top posting frowned upon?