Subject: slow umass with ehci in -current
To: None <current-users@netbsd.org>
From: Julien Benoist <julienbenoist@altern.org>
List: current-users
Date: 04/13/2004 11:15:33
Hi,

  are there some issues with ehci/umass currently that would slow down 
i/o ? Throught, is this normal that sd virtualizes block device geometry 
  when dealing with removable media ?

uhci0 at pci0 dev 29 function 0: Intel 82801DB/DBM USB UHCI Controller 
#1 (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1: Intel 82801DB/DBM USB UHCI Controller 
#2 (rev. 0x01)
uhci1: interrupting at irq 10
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2: Intel 82801DB/DBM USB UHCI Controller 
#3 (rev. 0x01)
uhci2: interrupting at irq 9
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7: Intel 82801DB/DBM USB EHCI Controller 
(rev. 0x01)
ehci0: interrupting at irq 5
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
..
sd0 at scsibus0 target 0 lun 0: <ST94011A, , 0811> disk fixed
sd0: fabricating a geometry
sd0: 38154 MB, 38154 cyl, 64 head, 32 sec, 512 bytes/sect x 78140160 sectors
sd0: fabricating a geometry
..

$ sudo usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
  port 1 powered
  port 2 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
  port 1 powered
  port 2 addr 2: low speed, power 100 mA, config 1, Optical USB 
Mouse(0xc016), Logitech(0x046d), rev 3.40
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
  port 1 powered
  port 2 powered
Controller /dev/usb3:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
  port 1 powered
  port 2 powered
  port 3 powered
  port 4 powered
  port 5 powered
  port 6 addr 2: high speed, self powered, config 1, USB TO IDE(0x0702), 
Genesys Logic(0x05e3), rev 0.02

dd stats :
$ sudo dd if=/dev/sd0d of=/dev/null bs=1k count=1024
1024+0 records in
1024+0 records out
1048576 bytes transferred in 2.032 secs (516031 bytes/sec)

$ sudo dd if=/dev/sd0d of=/dev/null bs=4k count=1024
1024+0 records in
1024+0 records out
4194304 bytes transferred in 6.635 secs (632148 bytes/sec)

$ uname -a
NetBSD neiluj 2.0C NetBSD 2.0C (NEILUJ) #0: Tue Apr 13 01:42:15 UTC 2004 
  julien@neiluj:/usr/src/sys/arch/i386/compile/NEILUJ i386

Practical tests while mounted show file i/o at ~ 1.2 Mbytes per sec, 
actually, everything like if this drive were connected at 'hi-speed'. 
(Note that i've had the same problem with ICH4 & ICH5 based boards).

--
Julien Benoist