This is the mail archive of the ecos-discuss@sourceware.org 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]

garbage collect trigger


Hello,

I don't really want to use the GC thread, but instead call GC from the application when it is safe to do so and when there is time to do so.

My first idea (1) is to enable the GC thread, but set the GC ticks very high, and call jffs2_garbage_collect_trigger(). But this is not an ecos API function, also struct super_block is not available (both in jffs2/../src/os-ecos.h).
Then I don't have to modifiy the GC code in ecos.


Another idea (2) is to modify the ecos GC code to add a callback to an application function
'bool gc_pass_allowed()'
and only do GC when the function returns true.


Now (3) I have changed jffs2_mount() to call jffs2_garbage_collect_pass() #ifndef CYGOPT_FS_JFFS2_GCTHREAD.
But then mounting can take very long: normally it takes 15s to mount 55MB of data. But it can also take 120s after having deleted almost 2000 files... And we must boot within 1 minute.



We decided to select (1). But therefore I need os-ecos.h, so I need to change ecos..
What do you think is the best approach?
All ideas are welcome.


Regards,

--
Jürgen Lambrecht
R&D Engineer
Televic Transport Systems
http://www.televic.com
Televic NV / SA (main office)  	
Leo Bekaertlaan 1
B-8870 Izegem
Tel: +32 (0)51 303045
Fax: +32 (0)51 310670


-- 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]