Date: Sat, 6 Jul 2013 20:32:11 -0700 From: Oleksandr Tymoshenko <gonzo@bluezbox.com> To: Warner Losh <imp@bsdimp.com> Cc: freebsd-arm@freebsd.org, Hans Petter Selasky <hselasky@c2i.net> Subject: Re: USB Performance on Raspberry Pi Message-ID: <433DF541-8C6C-4A51-9277-01F2B99F2077@bluezbox.com> In-Reply-To: <C7B05010-5448-43F5-B8B3-10D84B3D16BD@bsdimp.com> References: <20130707031732.GS39302@server.rulingia.com> <C7B05010-5448-43F5-B8B3-10D84B3D16BD@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2013-07-06, at 8:23 PM, Warner Losh <imp@bsdimp.com> wrote: >=20 > On Jul 6, 2013, at 9:17 PM, Peter Jeremy wrote: >=20 >> Hi Hans, >>=20 >> USB performance on the Raspberry Pi is rather lacking. This is = important >> because pretty much everything goes via USB. Do you have any = suggestions >> on how to fix the bottlenecks? I suspect one is that FreeBSD is = using >> PIO, whereas Linux is using DMA. >>=20 >> I've previously commented about the sawtooth pattern in ping times: >> 64 bytes from 192.168.123.231: icmp_seq=3D6 ttl=3D64 time=3D2.701 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D7 ttl=3D64 time=3D1.465 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D8 ttl=3D64 time=3D10.589 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D9 ttl=3D64 time=3D9.688 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D10 ttl=3D64 time=3D8.673 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D11 ttl=3D64 time=3D7.330 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D12 ttl=3D64 time=3D6.857 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D13 ttl=3D64 time=3D5.946 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D14 ttl=3D64 time=3D3.955 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D15 ttl=3D64 time=3D2.079 ms >> 64 bytes from 192.168.123.231: icmp_seq=3D16 ttl=3D64 time=3D1.072 ms >>=20 >> Whereas pinging a Linux RPi gives: >> round-trip min/avg/max/stddev =3D 0.276/0.373/0.455/0.049 ms >>=20 >> yongari@ gave me same patches for the SMSC NIC but they didn't have >> any noticable effect. >>=20 >> And the network throughput is also well below what Linux can achieve. >>=20 >> If I connect an external USB disk to a Linux RPi, I get 20.6 MBps >> read. The same disk on FreeBSD RPi gives 6.3 MBps - with ~50% >> interrupt time. >=20 > sure sounds a lot like the USB polling issues... Maybe we have a = problem with the USB controller generating the proper interrupts, or = some interrupt delivery problem? We use PIO mode which is *really* slow. Linux uses DMA mode. I have this=20= half-baked patch I've been sitting on for months: http://people.freebsd.org/~gonzo/patches/dwc_otg-dma-nosplit.diff There seems to be stability issues under heavy load and SPLIT = transactions=20 does not work which affects USB keyboards. I didn't have enough = time/motivation=20 to finish it :(=20=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?433DF541-8C6C-4A51-9277-01F2B99F2077>