Skip to contentSkip to conversation

Memory usage?

DISCUSSION Steve Tsai 4 participants 6 messages Oct 14, 2002 – Oct 15, 2002 Memory technology devices (MTD)

lore
Share & tools
lore

Steve Tsai

author
#0 lore raw

Does JFFS2 will allocate large memory to read big file? I have a 128M bytes nand flash on my board and there is a large file about 12M bytes. After I use the testing program to read the file, the free memory reduce to 312Kbytes (from 10660Kbytes). How can I reduce the memory usage of JFFS2? Thanks.

Steve Tsai

#1 lore raw
Quoted 5 lines · Steve Tsai

Does JFFS2 will allocate large memory to read big file? I have a 128M bytes nand flash on my board and there is a large file about 12M bytes. After I use the testing program to read the file, the free memory reduce to 312Kbytes (from 10660Kbytes). How can I reduce the memory usage of JFFS2? Thanks.

what do you mean by "free memory", are you including buffers and cache?

author
#2 lore raw

It does not include cache and buffer. I know the most memory becomes the cache, but I am using uClinux and the lower MemFree will cause system crash when I am loading program. I need to prevent the case.

Steve Tsai

Quoted 19 lines

-----Original Message-----
From: Russ Dill [mailto:[email protected]]
Sent: Tuesday, October 15, 2002 12:35 AM
To: Steve Tsai
Cc: Linux MTD mailing list
Subject: Re: Memory usage?

Quoted 1 line · Steve Tsai

Does JFFS2 will allocate large memory to read big file? I

have a 128M

Quoted 4 lines

bytes nand flash on my board and there is a large file about 12M bytes. After I use the testing program to read the file, the free memory reduce to 312Kbytes (from 10660Kbytes). How can I reduce the memory usage of JFFS2? Thanks.

what do you mean by "free memory", are you including buffers and cache?

#3 lore raw
Quoted 3 lines · [email protected] said:

It does not include cache and buffer. I know the most memory becomes the cache, but I am using uClinux and the lower MemFree will cause system crash when I am loading program. I need to prevent the case.

grep jffs2 /proc/slabinfo

--
dwmw2

#4 lore raw

[power-saving issue]

dear all,

we want to stop gc thread manually when system goto suspend mode,

can we simply call "jffs2_stop_garbage_collect_thread()"? and how to get its param: "struct jffs2_sb_info *c"

btw, i think gc thread wakeup only if its necessary not regularly, right?

best regards,

#5 lore raw

Re: [power-saving issue]

Quoted 3 lines · [email protected] said:

we want to stop gc thread manually when system goto suspend mode,
can we simply call "jffs2_stop_garbage_collect_thread()"? and how to get its param: "struct jffs2_sb_info *c"

Send it a SIGSTOP from userspace, then a SIGCONT when you want it to wake up. Or send it a SIGKILL to kill it permanently (until the next remount).

Quoted 2 lines

btw, i think gc thread wakeup only if its necessary not regularly, right?

Correct.

--
dwmw2