This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: JFFS2 "eating memory" when creating files


Andrew Lunn wrote:
> > After making the attached changes to fs-ecos.c, things are looking much
> > better, but JFFS2 still "eats" 24 bytes every time I open, write and
> > close a file.
>
> Im not sure i like this patch as is.
>
> Question: What happens when you open/write/close the same file again
> and again? Does it use the cached information or does it create a new
> cache entry each time?
>
> Im assuming it does reuse the cached information. Thats what a cache
> is for. So keeping the cache around helps make the fs faster.
>
> Your patch should be controlled by a configuration option which
> controls is the cache is flushed on close and the default should be
> not to flush the cache.
>
>     Andrew

As I already pointed out earlier, every operation that modifies the contents
of a JFFS2 file system writes new nodes to the log, which are represented in
RAM as a struct raw_node_ref. Hence the increase in RAM usage is normal and
expected behavior. RAM usage will continously increase until garbage collection
is triggered.

Try using the pool option and watch the increase disappear.

tk

-- 
--------------------------------------------------

Thomas Koeller, Software Development

Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany

Tel +49 (4102) 463-390
Fax +49 (4102) 463-46390

mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com

==============================


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]