JFFS3 & performance

Joakim Tjernlund joakim.tjernlund at lumentis.se
Fri Dec 17 06:10:20 EST 2004


> 
> > 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? 

example, when writing a buffer to flash you first CRC it from top to bottom.
The bottom part of the buffer is then newer than the top of then buffer in the
L1 cache or the top part has already been evicted from the L1 cache depending
of the size of the buffer and size of L1 cache.

Now you start again from the top of the buffer to actually write the buffer
to flash and you probaly need to read the data from RAM into L1 cache again.

Reading from flash will cause similar effects.

If you calculate CRC backwards you will avoid trashing the cache needlessly.

 Jocke





More information about the linux-mtd mailing list