From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20734 invoked by alias); 19 Oct 2009 10:53:28 -0000 Received: (qmail 20719 invoked by uid 22791); 19 Oct 2009 10:53:27 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Oct 2009 10:53:23 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 668B02F78013; Mon, 19 Oct 2009 11:53:21 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t-Dej010i7BZ; Mon, 19 Oct 2009 11:53:17 +0100 (BST) Message-ID: <4ADC452B.5040706@ecoscentric.com> Date: Mon, 19 Oct 2009 10:53:00 -0000 From: Ross Younger User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Jonathan Larmour CC: Rutger Hofman , =?ISO-8859-1?Q?J=FCrgen_Lambrecht?= , eCos developers , Deroo Stijn Subject: Re: NAND technical review References: <4ACB4B58.2040804@ecoscentric.com> <4ACC61F0.3020303@televic.com> <4AD3E92E.5020301@jifvik.org> <4AD47ADE.9010606@cs.vu.nl> <4AD6A7EC.8080703@jifvik.org> In-Reply-To: <4AD6A7EC.8080703@jifvik.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-10/txt/msg00033.txt.bz2 Jonathan Larmour wrote: > I wonder if Ross has any performance data for E he could contribute? I have done a little benchmarking and so have _some_ numbers to hand, but the goalposts are moving and my figures are a bit old and must be treated with caution... On the EA LPC2468 board (Samsung K9 NAND chip), with the state of my code on July 8, compiling with -O2 and asserts off, my NAND benchmarker reported average page read times[*] of 3578us per page, programming 2680us, and erasing 1848us. These stack up against the fastest-possible raw chip times (which I computed from the "typical" times on the datasheet) of 88.5, 363.5 and 2000us. [*] full page (2k) plus OOB This led to a YAFFS throughput data rate, on a recently-erased NAND array, of up to 480kB/s in reading and 578kB/s in writing. (Actual rates vary depending on the size of chunk you pass to read() and write().) It seems worthwhile to share numbers for the customer port I've been working on; not because they're of direct use to the eCos project, but to show what a difference the hardware makes. The board is based on the Samsung S3C2410X ucontroller and carries the same Samsung K9 NAND chip as on the EA LPC2468. Now, this CPU has a dedicated NAND controller with hardware ECC... After I taught the library to use h/w ECC I immediately saw a 46% speedup on reads and 38% on writes when compared with software ECC. I've also added an option to do a partial loop unroll in the read and write cycles which gives a further 4% boost on reads and 15% on writes. The current (work-in-progress) numbers I have from the benchmarker are 452us per page read, 623us per write and 1934us per erase; YAFFS throughput is similarly impressive at 4690 kB/s in reads and 3432 kB/s in writes. (Charles Manning has stated publicly several times that if you want YAFFS to be fast, you should start by looking at the speed of your NAND driver.) Of course, we're not comparing apples with apples here; the S3C2410X is an ARM9 whose CPU clock runs at 200MHz, but the EA LPC2468 is an ARM7TDMI running at just 48MHz, but even so the speed-up given by hardware ECC demonstrates that option to be a no-brainer. BTW: Some profiling and souping up is on my todo list, and some more benchmarking will probably happen at that time. When I implement hardware ECC support on the STM3210E I intend to produce some before and after numbers. Ross -- Embedded Software Engineer, eCosCentric Limited. Barnwell House, Barnwell Drive, Cambridge CB5 8UU, UK. Registered in England no. 4422071. www.ecoscentric.com