Getting USB2 on FreeBSD 5.3?

Julian Elischer julian at elischer.org
Sat Jan 8 14:46:21 PST 2005


Arne Wörner wrote:
>>da0 at umass-sim0 bus 0 target 0 lun 0
>>da0: <ST312002 6A 3.04> Fixed Direct Access SCSI-0 device
>>da0: 1.000MB/s transfers

ignore this.. USB doesn't yet know how to tell CAM that it can do more..

>>
> 
> I thought, USB1.1 can do 1.5Mbytes/sec and USB2 can do 480Mbit/sec
> (I read it in advertisements for USB devices).
> 
> Why does da0 say, that it can do just 1MBytes/sec?

because code to say otherwise hasn't been written yet.

> 
> 
>>[[ I replied:
>>Actually, it helps some. I am seeing similar results (well, 7.1
>>MB/s), so this is a bit heartening. But it doesn't explain why
>>we're not seeing the 50 MB/s we're supposed to be seeing. ]]
>>
> 
> 480/8 is 60, isn't it? So we should see 60 MB/s, or is it just
> marketing talk? I like it, when FreeBSD is nearly as fast as
> possible (several years ago some FreeBSD NIC drivers were quite
> efficient).

there are tremendous overheads in USB.  especially in 1.1

all data transfers (in 1.1) are broken down to 64 byte transfers
and each transfer has a lot of overhead..
12Mb/sec, yes, but for data trsfers the maximum efficiency you
can get is 82% so effectively that is 9840000 bits/sec or
1.23MB/sec.
and that would be the ABSOLUTE MAXIMUM you would see..

for USB2.0 it's a bit better..
you can see up to 92% efficiency, but that assumes you have
no turnaround time, of command processing times. USB2.0
allows bulk data transfers to be broken down into packets of
upto 512 bytes which helps the efficiency a lot as the overhead
per packet is somewher around 55 bytes worth.

there are lots of other factors.. for example, we can only receive
upto 8000 intrrupts per second, (currently actually only 4000)
and with current code that is one transaction per interrupt,
where a disk read is at least 2 transactions..  request for data, data
limiting you to around 2000 transactions per second.. if you are
reading 16KB/read that is 32MB max..
ANd I have a suspicion that many transactions are 3 actual
USB transactions meaning that at 4000 interupts per second
we may be limiting ourselves to 1300 reads per sec which at 16KB
per read would be aroung 22MB/sec.


and I doubt we are that efficient yet.. its still early days.
There are ways to:
1/ do more transactions per interrupt.
2/ do the 3 transactions more efficiently.
3/ do more interrupts per second (the EHCI spec allows upto 8000).

> 
> I am wondering, why my USB1.1 Cytronix SmartMedia card reader does
> not more than 1MBytes/sec...
See above.
> 
> I just wanted to point out some little aspects of the problem...
> 
> -Arne
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> http://info.mail.yahoo.com/mail_250
> _______________________________________________
> freebsd-usb at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-usb
> To unsubscribe, send any mail to "freebsd-usb-unsubscribe at freebsd.org"



More information about the freebsd-usb mailing list