Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Sep 2006 17:29:28 +0200
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: New UMASS driver available for testing
Message-ID:  <20060930152928.GB1441@roadrunner.q.local>
In-Reply-To: <200609171214.49165.hselasky@c2i.net>
References:  <200609171214.49165.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <ACPI PCI bus> on pcib1
 acpi_video0: <ACPI video extension> port 0xc000-0xc0ff mem 0xd0000000-0xdfffffff,0xfcff0000-0xfcffffff irq 11 at device 0.0 on pci1
 uhci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0xbf80-0xbf9f irq 11 at device 29.0 on pci0
-uhci0: [GIANT-LOCKED]
+uhci0: LegSup = 0x0000
 usb0: <Intel 82801DB (ICH4) USB controller USB-A> 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: <Intel 82801DB (ICH4) USB controller USB-B> port 0xbf40-0xbf5f irq 11 at device 29.1 on pci0
-uhci1: [GIANT-LOCKED]
+uhci1: LegSup = 0x0000
 usb1: <Intel 82801DB (ICH4) USB controller USB-B> 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: <Intel 82801DB (ICH4) USB controller USB-C> port 0xbf20-0xbf3f irq 11 at device 29.2 on pci0
-uhci2: [GIANT-LOCKED]
+uhci2: LegSup = 0x0000
 usb2: <Intel 82801DB (ICH4) USB controller USB-C> 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: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> mem 0xf4fffc00-0xf4ffffff irq 11 at device 29.7 on pci0
-ehci0: [GIANT-LOCKED]
+ehci0: <EHCI (generic) USB 2.0 controller> 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: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> 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: <EHCI (generic) USB 2.0 controller> on ehci0
 pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
 pci_link1: BIOS IRQ 11 for 2.3.INTA is invalid
 pci2: <ACPI PCI bus> on pcib2
@@ -93,7 +65,7 @@
 fwip0: <IP over FireWire> on firewire0
 fwip0: Firewire address: 35:4f:c0:00:35:67:98:30 @ 0xfffe00000000, S400, maxrec 2048
 dcons_crom0: <dcons configuration ROM> on firewire0
-dcons_crom0: bus_addr 0x724e40
+dcons_crom0: bus_addr 0x730d60
 sbp0: <SBP-2/SCSI over FireWire> 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 <FUJITSU MHT2060AT PL 0022> at ata0-master UDMA100
-acd0: DVDR <NEC DVD RW ND-5500A/1.51> 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: <Co Ltd MP3 Flash Stick, class 0/0, rev 1.10/1.00, addr 125>
+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: <Sun Microsystems (unofficial) PS/2 KB & MS, class 0/0, rev 1.00/0.01, addr 123>
+kbd2 at ukbd0
+ums0: <Sun Microsystems (unofficial) PS/2 KB & MS, class 0/0, rev 1.00/0.01, addr 123>
+ums0: 3 buttons and [XY] coordinates
+ums1: <Logitech USB Mouse, class 0/0, rev 1.10/4.00, addr 122>
+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 <FUJITSU MHT2060AT PL 0022> at ata0-master UDMA100
+acd0: DVDR <NEC DVD RW ND-5500A/1.51> 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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060930152928.GB1441>