JFFS3 & performance

Jörn Engel joern at wohnheim.fh-wedel.de
Tue Dec 21 09:38:30 EST 2004


On Thu, 16 December 2004 14:20:43 +0100, Joakim Tjernlund wrote:
> 
> 2) Consider another checksum algorithm. Crc32 is very expensive
>    and JFFS2 suffered severely in the early days. Now that crc32 is
>    very optimized that problem is less visible, but crc32 is still
>    expensive. Maybe an Adler32 checksum is good enough or a crc16?

Ok, after further thought, I actually like adler32.  It uses two
checksums that individually are very weak.  But the combination of the
two proves to be surprisingly strong.  Running my hash-table test,
adler32 is on par with the best hash function I could come up with
(and faster than any hash function in the kernel).

The hash-table test is quite nice, as it penalizes weak hash
functions.  Hash functions that run fast, but cause many collisions,
cause more time to be spent in search for a free slot.  So only
functions that are fast _and_ strong do well.  And adler32 does
extremely well.

So, unless you want to change the function to run backwards, I'd
propose to use adler32.

Jörn

-- 
/* Keep these two variables together */
int bar;




More information about the linux-mtd mailing list