RFC - patch to reduce peak memory usage by disabling compression

David Woodhouse dwmw2 at infradead.org
Thu Aug 21 08:44:59 EDT 2003


On Thu, 2003-08-21 at 14:31 +0200, Øyvind Harboe wrote:
> Reduce RAM usage by removing compression/decompression altogether.

You could make it use a static buffer and serialise compression, and it
really would be only 4KiB you're saving.

I sincerely hope this is done because you're using uncompressible data,
rather than trading about 4KiB of cheap RAM for a doubling in expensive
flash space :)

If you're doing this, I'd prefer to change jffs2_compress() to allocate
its _own_ buffer (or optionally use a static one), then have a simple
definition of jffs2_compress which does nothing in the
!CONFIG_JFFS2_FS_COMPRESSION case. 

You need to handle the case where compression is configured out and a
filesystem created with compressed nodes is encountered -- it looks like
it'll die horribly at the moment.

I'd also like to see individual compression routines selectable, and
also at runtime with something akin to chattr.

-- 
dwmw2




More information about the linux-mtd mailing list