[RESUBMIT] [PATCH] [MTD] NAND nand_ecc.c: rewrite for improved performance
Frans Meulenbroeks
fransmeulenbroeks at gmail.com
Fri Aug 15 04:41:38 EDT 2008
2008/8/14, Troy Kisky <troy.kisky at boundarydevices.com>:
> frans wrote:
> > Fixed the last remaining issues, made sure to diff with the very latest mtd
> > git version.
> >
> > Attached is a complete rewrite of nand_ecc.c including documentation.
> > This rewrite improves performance about 18 times on intel (D920),
> > 7 times on MIPS and 5 times on ARM (NSLU2)
> >
> > Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks at gmail.com>
>
>
> This look very complex to me. How about something like this.
> Note, I could make it much smaller if allowed to result in a different
> ecc value than current implementation.
>
To some extend my code is complex. That is why I also provided
documentation to explain how things work.
Your code is indeed much simpler and smaller, but unfortunately it is
also slower.
I did a quick benchmark test. Your code (on x86) is about three times
as fast as the original code. However it is still about 5 times as
slow as the code I submitted.
Your speedup is mostly caused by going from 8 bit processing in the
original code to 32 bit processing in your code.
I've achieved additional gain by loop unrolling.
Since this code is very often executed in embedded systems that have
nand flash and no hardware ecc correction, I feel the focus on
performance.
Best regards, Frans.
More information about the linux-mtd
mailing list