From owner-freebsd-arm@FreeBSD.ORG Mon Jul 26 16:03:54 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB88D1065670 for ; Mon, 26 Jul 2010 16:03:54 +0000 (UTC) (envelope-from gja@ansley.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8F0878FC1D for ; Mon, 26 Jul 2010 16:03:54 +0000 (UTC) Received: by yxe42 with SMTP id 42so145707yxe.13 for ; Mon, 26 Jul 2010 09:03:53 -0700 (PDT) Received: by 10.150.139.21 with SMTP id m21mr2246753ybd.80.1280160233822; Mon, 26 Jul 2010 09:03:53 -0700 (PDT) Received: from G5.internal.ansley.com (99-135-104-139.lightspeed.tukrga.sbcglobal.net [99.135.104.139]) by mx.google.com with ESMTPS id q31sm5892838ybk.1.2010.07.26.09.03.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Jul 2010 09:03:52 -0700 (PDT) Sender: Greg Ansley Message-ID: <4C4DB1E7.7090201@ansley.com> Date: Mon, 26 Jul 2010 12:03:51 -0400 From: Greg Ansley User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 MIME-Version: 1.0 To: "freebsd-arm@FreeBSD.org" References: <4C444E8B.6090104@ansley.com> <20100719153614.GI28908@cicely7.cicely.de> <20100719.182202.918765004097971572.imp@bsdimp.com> <20100720023034.GS28908@cicely7.cicely.de> In-Reply-To: <20100720023034.GS28908@cicely7.cicely.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: at91sam9g20: Ethernet performance X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 16:03:54 -0000 Quick (read very very rough) real world numbers using the same (new) if_ate code: "ping -s 1500 -c 1000 -i .006" (from an idle quad core server on a 100BaseT): rm9200: min/avg/max/stddev = 0.826/1.001/2.472/0.063 (if_ate) sam9g20: min/avg/max/stddev = 0.526/0.586/0.892/0.037 (if_ate) While the 9g20 is not blazing it is respectable on a 100Mb link and ~1.7 times faster that the rm9200 even with the receive copies still in place. For reference here are the results from the if_macb driver for sam9 (only) that was committed a few days ago: sam9g20: min/avg/max/stddev = 0.703/0.779/1.000/0.038 (if_macb) Greg On 7/19/10 10:30 PM, Bernd Walter wrote: > The performance has two reasons. > First the fact that the RM9200 ATE can't DMA into non 4-byte aligned > buffers, which requires copying and memory bandwidth is rather slow, > which especially sucks because of the required copy'ing. > IP headers are no n*4 bytes, so you want a 2 byte offset in your > receive buffers otherwise IP code copy'es received buffers. > On sending AFAIK the ATE driver copy'es data into 4 alignment. > The memory interface on SAM9 is much faster because it is DDR, > higher clocked and with it's bus matrix e.g. DMA can access DDRAM > and CPU IO in parallel. > I don't see a technical reason to have different source files. > A few things can be tuned on compiletime, but this is only > a win to save code size - from the runtime point a few rev-checks > in hybrid kernel shouldn't hurt. >