From owner-freebsd-arm@FreeBSD.ORG Sun Jul 7 03:23:25 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B868D9D1 for ; Sun, 7 Jul 2013 03:23:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) by mx1.freebsd.org (Postfix) with ESMTP id 8BE111F1B for ; Sun, 7 Jul 2013 03:23:25 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id k13so7759959iea.18 for ; Sat, 06 Jul 2013 20:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=UkzhFxYc+qwxDC3YJknjeaw/GNAL6bfc7/vn60ixFT8=; b=m2xh5d4+qLt40+0RZkwk7FhAFMkX+37UlcKOnx8FSvOSTU7h094bKRJtZecY/b19Nu Sv2k0fGxYamQMhBPW1q6zH1OcFMLjRABlNuh224j6w9iBAFBrwSbOwh6/9tlLJOF69jT 2Y1CqYEGEcu0X2zsR6Q+sDSpCxjMofd6wyF+fZfsz+dlbiWIa3p+F5OJC/RDNyszVhVT d0bby/jzyE60OODuncMatlZOfPSD08m1yUeMS8tpSbKB8LaywWaTrWhUWXmyrIv6SEa/ lr5FL29cFo3EPlPKGY3/140a+Rp+Ui32Agl4ur5WYq7qsewYyRKc5WJxWhrpS1BbHI4H LV3w== X-Received: by 10.50.114.229 with SMTP id jj5mr6758385igb.36.1373167404680; Sat, 06 Jul 2013 20:23:24 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id w5sm21922078igz.10.2013.07.06.20.23.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 06 Jul 2013 20:23:23 -0700 (PDT) Sender: Warner Losh Subject: Re: USB Performance on Raspberry Pi Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20130707031732.GS39302@server.rulingia.com> Date: Sat, 6 Jul 2013 21:23:22 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20130707031732.GS39302@server.rulingia.com> To: Peter Jeremy X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQmFb+LW8+rswxBgkwg6j1UnNLeLOatkTSnDUfA0vIlStYGB9bRvcz4Xa7I/JDtnpSlvFa7n Cc: freebsd-arm@freebsd.org, Hans Petter Selasky X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 03:23:25 -0000 On Jul 6, 2013, at 9:17 PM, Peter Jeremy wrote: > 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. 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? Warner=