Skip to contentSkip to conversation

JFFS2 ram memory usage

DISCUSSION Øyvind Harboe 2 participants 3 messages Aug 7, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I've made some changes to JFFS2 locally to reduce memory usage.

The change I did was to disable compresssion as I have lots of flash and little ram(Atmel EB40a 2MB flash + 256k ram + eCos and my app).

My usage of JFFS2 is intermittant and hence I'd like to reduce peak memory usage(much better with compression disabled) and idle memory usage(perhaps unmounting JFFS2 when I'm not using it?).

I did post a RFC on the changes I did to the ecos-patches mailing list, but I'll clean it up to the best of my abilities if there might be useful to others as well.

Comments?

http://sources.redhat.com/ml/ecos-patches/2003-08/msg00019.html

Sincerely,
Øyvind

#1 lore raw
Quoted 5 lines · Øyvind Harboe

I've made some changes to JFFS2 locally to reduce memory usage.

The change I did was to disable compresssion as I have lots of flash and little ram(Atmel EB40a 2MB flash + 256k ram + eCos and my app).

You could also remove the actual compression routines if you're going to do that. Other users, especially eCos users, may want to individually select the compression algorithms available too.

Quoted 4 lines

My usage of JFFS2 is intermittant and hence I'd like to reduce peak memory usage(much better with compression disabled) and idle memory usage(perhaps unmounting JFFS2 when I'm not using it?).

Finding a way to eliminate the 'totlen' field of the jffs2_raw_node_ref structure might be productive. Or possibly making the jffs2_raw_node_ref contain doubly-linked lists if that then means we can discard obsolete nodes immediately rather than keeping them around.

Signature · 1 line
dwmw2
#2 lore raw
Quoted 2 lines

You could also remove the actual compression routines if you're going to do that.

In my patch I:

- removed the allocation of the compression/decompression buffer that the compression routines uses to attempt to compress.
- removed the invocation of the compression/decompression call.

Quoted 2 lines

Other users, especially eCos users, may want to individually select the compression algorithms available too.

Agreed.

I haven't checked, but I can't imagine that the runlength compressor using a lot of memory.

Quoted 5 lines

Finding a way to eliminate the 'totlen' field of the jffs2_raw_node_ref structure might be productive. Or possibly making the jffs2_raw_node_ref contain doubly-linked lists if that then means we can discard obsolete nodes immediately rather than keeping them around.

I don't speak enough JFFS2 currently to comfortably attempt this.

Øyvind