[PATCH RFC] 1/2 central workspace for zlib

Jörn Engel joern at wohnheim.fh-wedel.de
Mon Jun 2 09:32:06 EDT 2003


On Mon, 2 June 2003 15:03:52 +0200, Joakim Tjernlund wrote:
> >
> > The kernel workspace #defines MAX_MEM_LEVEL to 9, while the zlib
> > default is 8.  That translates to 256k instead of 128k is is likely
> > pointless for JFFS2 style of compression.  Another 50k come from the
> > seperate workspaces for inflate and deflate.  So JFFS2 should be able
> > to work with 280k, roughly.
> 
> hmm, won't the mem level in zlib_deflateInit() influence the needed workspace? I always
> figured that the memory reuirements listed in zconf.h was worst case.
> Since JFFS2 uses mem level 3, is it not possible that JFFS2 needs less memory?

Yes, that makes sense.  Seems a bit hard to exploit that in a clean
way, but not impossible.

> > Have you ever seen/done benchmarks that test zlib compression
> > efficiency?
> no, sorry.

Then someone will have to do those and figure out who actually profits
from the larger mem level.  Depending on the results, we could #define
the value back to 8, make it an option under CONFIG_EMBEDDED or
something similar.

Jörn

-- 
A surrounded army must be given a way out.
-- Sun Tzu



More information about the linux-mtd mailing list