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]

jffs2 garbage collection


I am planning to use the jff2 flash file system
for data storage in my target, but I am a bit
worried about one topic: garbage collection. So
if anyone with prior experience in this field could
shed some light on the topics below, I'd be
gratefuel.

My understanding is that gc can be triggered
by any operation that increases the amount of data
stored in the file system, such as writing data to
a file. Since gc may cause erasing of flash sectors,
which is a slow operation and may even involve busy
waiting within the flash driver, I am afraid of
the impact on the entire system if files are written
by high-priority threads.

Should I really be concerned with this, or does
jffs2 already take measures to avoid such problems?
Is there a way to offload gc to a low-priority background
thread? Should I constrain jffs2 file writing to a
'file server' thread with suitably chosen priority?

Another question, if my multithreaded application
is running from flash, do I have to lock/unlock the
scheduler before and after writing data to a file,
if the application code and the file system share
the same physical flash chip? This would of course
be unacceptable, given the time it takes to erase a
sector.

Any comments appreciated!

----------------------------------------------- 
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://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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