JFFS3 & performance

Joakim Tjernlund joakim.tjernlund at lumentis.se
Fri Dec 17 06:19:55 EST 2004


> On Fri, 17 Dec 2004 jasmine at linuxgrrls.org wrote:
> 
> > 
> > 
> > On Fri, 17 Dec 2004, Artem B. Bityuckiy wrote:
> > 
> > >> Another idea, calculate the CRC backwards(from the end of the buffer to the beginning).
> > >> That give better L1 cache behaviour.
> > >>
> > > Why (may be some URL)? For all archs?
> > 
> > Because the process to use the buffer after the CRC will probably start 
> > from the beginning.  Processing the CRC from the beginning to the end will 
> > tend to leave the L1 cache full of the end of the buffer and thus the next 
> > process to use it will need to reload the L1.
> > 
> > -J.
> > 
> Ok, I got it, thanks.

I wish I read all new messages before I anwer so I don't answer when someone else already has :(

Looked a little closer on csum_partial and I think JFFS3 can use it. You need
csum_fold as well:
seed = ~0;
crc = csum_fold(csum_partial(buff, len, seed));

Don't know if it is good enough for JFFS3 but it is fast.

 Jocke




More information about the linux-mtd mailing list