[PATCH] [MTD] NAND nand_ecc.c: rewrite for improved performance

Frans Meulenbroeks fransmeulenbroeks at yahoo.com
Sun Jul 6 06:12:14 EDT 2008


[PATCH] [MTD] NAND nand_ecc.c: rewrite for improved performance

First off upfront apologies if this is not fully according to the way to submit patches. Although far from new in the unix/linux world (yes I am the Frans Meulenbroeks from Minix for the Atari ST 1.5), it is the first time I try to submit a patch (so if I do things inappropriate, please friendly educate me and don't bash me :-) )

For a project for my employer (Koninklijke Philips Electronics), I investigated performance improvements in one of our products. One of the things that came out was that the software ecc correction ate up too much CPU cycles. I've completely rewritten drivers/mtd/nand/nand_ecc.c from scratch to resolve this.

The new file is about 18 times as fast when it comes to calculating the ecc on my development system, and about 7 times as fast on the MIPS core for which this work was done. 
Repairing a faulty ECC is done in about half the time it used to take.

Details of the way the new algorithm works are in the attached file ecc.txt
Not too sure if this txt file should be part of the patch or not. 
I'll leave it up to the maintainers of MTD to decide.

I've got permission from Koninklijke Philips Electronics to contribute this code.

I have included the complete nand_ecc.c file. It was derived from scratch so a patch would have been much bigger.

I also have a comparison program that I used for verifying correctness while developing and for doing performance measurements. Not too sure if it is useful for anyone, but if there is interest, just let me know.

Enjoy, Frans.

From: Frans Meulenbroeks [fransmeulenbroeks at yahoo dot com]


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nand_ecc.c
Type: text/x-csrc
Size: 13956 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20080706/31d6dad0/attachment-0001.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ecc.txt
Url: http://lists.infradead.org/pipermail/linux-mtd/attachments/20080706/31d6dad0/attachment-0001.txt 


More information about the linux-mtd mailing list