public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] jffs2 garbage collect
@ 2006-09-20 14:17 Jürgen Lambrecht
  2006-09-20 14:48 ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: Jürgen Lambrecht @ 2006-09-20 14:17 UTC (permalink / raw)
  To: eCos Discussion

Hello,

this is the comment explaining jffs2 garbage collect:

# Enable background garbage collection thread, for making
# free space ahead of time. Leave this off till it's been
# implemented. And don't implement it till icache locking has
# been made thread-safe.

There is garbage collect code in ecos, so I suppost it is implemented.
And on my ARM7TDMI cpu, I don't have any cache, or is "icache" meaning 
something like "i-node cache" ?

So my question is, can I safely use the garbage collect thread?

Kind regards,

-- 
Jürgen Lambrecht
Development 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] jffs2 garbage collect
  2006-09-20 14:17 [ECOS] jffs2 garbage collect Jürgen Lambrecht
@ 2006-09-20 14:48 ` Andrew Lunn
  2006-09-20 15:08   ` Jürgen Lambrecht
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2006-09-20 14:48 UTC (permalink / raw)
  To: J?rgen Lambrecht; +Cc: eCos Discussion

On Wed, Sep 20, 2006 at 04:16:43PM +0200, J?rgen Lambrecht wrote:
> Hello,
> 
> this is the comment explaining jffs2 garbage collect:
> 
> # Enable background garbage collection thread, for making
> # free space ahead of time. Leave this off till it's been
> # implemented. And don't implement it till icache locking has
> # been made thread-safe.
> 
> There is garbage collect code in ecos, so I suppost it is implemented.
> And on my ARM7TDMI cpu, I don't have any cache, or is "icache" meaning 
> something like "i-node cache" ?

icache is a jffs2 term, meaning i-node cache. There is a linked list
of inodes kept in memory. At the moment there is no mutex around
operations on this linked list. The eCos fileio code will serialise
access via the file system API so that only one thread will access
JFFS2 at once, but the gc thread does not use this API and so can use
the cache at the same time as normal file system operations. 

Take a look at jffs2_i* functions in fs-ecos.c

> So my question is, can I safely use the garbage collect thread?

No, i think not.

    Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] jffs2 garbage collect
  2006-09-20 14:48 ` Andrew Lunn
@ 2006-09-20 15:08   ` Jürgen Lambrecht
  2006-09-20 15:25     ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: Jürgen Lambrecht @ 2006-09-20 15:08 UTC (permalink / raw)
  To: eCos Discussion

Thanks for your fast reply Andrew.

The problem I have is that the user will first delete files from flash to 
make place, and then tftp files to flash. But the place only really 
becomes available after a garbage collect (or after reboot).

To delete files, we use a "magic" deletion file. At the end of processing 
that file, I want to add garbage collection.
- I could do this by starting the GC thread, and then stopping it again.
- Or maybe better, by calling myself jffs2_garbage_collect_pass(c).
- Or I guess I could also unmount jffs2 and mount it again.

What is in your opinion the best approach?

Kind regards,

Jürgen Lambrecht
Development 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

Andrew Lunn wrote:
> On Wed, Sep 20, 2006 at 04:16:43PM +0200, J?rgen Lambrecht wrote:
> 
>>Hello,
>>
>>this is the comment explaining jffs2 garbage collect:
>>
>># Enable background garbage collection thread, for making
>># free space ahead of time. Leave this off till it's been
>># implemented. And don't implement it till icache locking has
>># been made thread-safe.
>>
>>There is garbage collect code in ecos, so I suppost it is implemented.
>>And on my ARM7TDMI cpu, I don't have any cache, or is "icache" meaning 
>>something like "i-node cache" ?
> 
> 
> icache is a jffs2 term, meaning i-node cache. There is a linked list
> of inodes kept in memory. At the moment there is no mutex around
> operations on this linked list. The eCos fileio code will serialise
> access via the file system API so that only one thread will access
> JFFS2 at once, but the gc thread does not use this API and so can use
> the cache at the same time as normal file system operations. 
> 
> Take a look at jffs2_i* functions in fs-ecos.c
> 
> 
>>So my question is, can I safely use the garbage collect thread?
> 
> 
> No, i think not.
> 
>     Andrew
> 

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] jffs2 garbage collect
  2006-09-20 15:08   ` Jürgen Lambrecht
@ 2006-09-20 15:25     ` Andrew Lunn
  2006-09-21  7:22       ` Jürgen Lambrecht
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2006-09-20 15:25 UTC (permalink / raw)
  To: J?rgen Lambrecht; +Cc: eCos Discussion

On Wed, Sep 20, 2006 at 05:07:58PM +0200, J?rgen Lambrecht wrote:
> Thanks for your fast reply Andrew.
> 
> The problem I have is that the user will first delete files from flash to 
> make place, and then tftp files to flash. But the place only really 
> becomes available after a garbage collect (or after reboot).

The garbage collection code is also run when the filesystem is 'full',
ie it cannot allocate space for new data. I will run the garbage
collection code and then try the allocation again. This is why all the
comments say that the garbage collection they is only nice to have,
not required.
 
> To delete files, we use a "magic" deletion file. At the end of processing 
> that file, I want to add garbage collection.
> - I could do this by starting the GC thread, and then stopping it again.
> - Or maybe better, by calling myself jffs2_garbage_collect_pass(c).
> - Or I guess I could also unmount jffs2 and mount it again.

Only the last option is safe. The others potentially could cause
filesystem corruption.

What is wrong with having garbage in your filesystem anyway? 

     Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] jffs2 garbage collect
  2006-09-20 15:25     ` Andrew Lunn
@ 2006-09-21  7:22       ` Jürgen Lambrecht
  2006-09-21  7:28         ` Andrew Lunn
  2006-09-22  8:15         ` [ECOS] AT91RM9200 & eCos - eCos port available or not? Dmitriy I.Cherkashin
  0 siblings, 2 replies; 11+ messages in thread
From: Jürgen Lambrecht @ 2006-09-21  7:22 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: eCos Discussion

Andrew Lunn wrote:
> On Wed, Sep 20, 2006 at 05:07:58PM +0200, J?rgen Lambrecht wrote:
> 
>>Thanks for your fast reply Andrew.
>>
>>The problem I have is that the user will first delete files from flash to 
>>make place, and then tftp files to flash. But the place only really 
>>becomes available after a garbage collect (or after reboot).
> 
> 
> The garbage collection code is also run when the filesystem is 'full',
> ie it cannot allocate space for new data. I will run the garbage
> collection code and then try the allocation again. This is why all the
> comments say that the garbage collection they is only nice to have,
> not required.
>  
> 
>>To delete files, we use a "magic" deletion file. At the end of processing 
>>that file, I want to add garbage collection.
>>- I could do this by starting the GC thread, and then stopping it again.
>>- Or maybe better, by calling myself jffs2_garbage_collect_pass(c).
>>- Or I guess I could also unmount jffs2 and mount it again.
> 
> 
> Only the last option is safe. The others potentially could cause
> filesystem corruption.
> 
> What is wrong with having garbage in your filesystem anyway? 
Because the garbage represents free space that is not available. Our 
customer wants to update the files in flash twice a year. This is 
potentialy all files. In worst case, all data must first be deleted and 
then new data uploaded.

Thanks for your replies,
Juergen
> 
>      Andrew
> 

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] jffs2 garbage collect
  2006-09-21  7:22       ` Jürgen Lambrecht
@ 2006-09-21  7:28         ` Andrew Lunn
  2006-09-22  8:15         ` [ECOS] AT91RM9200 & eCos - eCos port available or not? Dmitriy I.Cherkashin
  1 sibling, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2006-09-21  7:28 UTC (permalink / raw)
  To: J?rgen Lambrecht; +Cc: eCos Discussion

> >What is wrong with having garbage in your filesystem anyway? 
> Because the garbage represents free space that is not available. Our 
> customer wants to update the files in flash twice a year. This is 
> potentialy all files. In worst case, all data must first be deleted and 
> then new data uploaded.

This should not be a problem, if everything is working as it
should. As i said, the garbage collection thread is only nice to
have. If the filesyste is full of garbage and you want to write more
data, a normal file operation will do a garbage collect. The space
taken by garbage should be available.

      Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ECOS] AT91RM9200 & eCos - eCos port available or not?
  2006-09-21  7:22       ` Jürgen Lambrecht
  2006-09-21  7:28         ` Andrew Lunn
@ 2006-09-22  8:15         ` Dmitriy I.Cherkashin
  2006-09-22  9:51           ` Andrew Lunn
  2006-09-22 17:31           ` Wolfgang Köbler
  1 sibling, 2 replies; 11+ messages in thread
From: Dmitriy I.Cherkashin @ 2006-09-22  8:15 UTC (permalink / raw)
  To: ecos-discuss; +Cc: dch

I am interesting  eCos port for AT91RM9200. It is available now or not?  
Best Regards, Dmitriy I.Cherkashin.
email: dch@ucrouter.ru , divch@users.sourceforge.net
phone: +7-910-422-2917; ICQ (202-375-343)




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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] AT91RM9200 & eCos - eCos port available or not?
  2006-09-22  8:15         ` [ECOS] AT91RM9200 & eCos - eCos port available or not? Dmitriy I.Cherkashin
@ 2006-09-22  9:51           ` Andrew Lunn
  2006-09-22 17:31           ` Wolfgang Köbler
  1 sibling, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2006-09-22  9:51 UTC (permalink / raw)
  To: Dmitriy I.Cherkashin; +Cc: ecos-discuss, dch

On Fri, Sep 22, 2006 at 12:29:36PM +0400, Dmitriy I.Cherkashin wrote:
> I am interesting  eCos port for AT91RM9200. It is available now or not?  
> Best Regards, Dmitriy I.Cherkashin.
> email: dch@ucrouter.ru , divch@users.sourceforge.net
> phone: +7-910-422-2917; ICQ (202-375-343)

I think there is such a port, but it is not part of anoncvs.  There
was never a copyright assignment signed if i remember correctly.  Try
searching back in the email archives and you should be able to find
the email which announced it was available.

          Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] AT91RM9200 & eCos - eCos port available or not?
  2006-09-22  8:15         ` [ECOS] AT91RM9200 & eCos - eCos port available or not? Dmitriy I.Cherkashin
  2006-09-22  9:51           ` Andrew Lunn
@ 2006-09-22 17:31           ` Wolfgang Köbler
  2006-09-22 23:09             ` Dmitriy I.Cherkashin
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Köbler @ 2006-09-22 17:31 UTC (permalink / raw)
  To: Dmitriy I.Cherkashin; +Cc: dch, ecos-discuss


On 22-Sep-2006 Dmitriy I.Cherkashin wrote:
> I am interesting  eCos port for AT91RM9200. It is available now or not?
http://ecos.sourceware.org/ml/ecos-discuss/2006-01/msg00083.html


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] AT91RM9200 & eCos - eCos port available or not?
  2006-09-22 17:31           ` Wolfgang Köbler
@ 2006-09-22 23:09             ` Dmitriy I.Cherkashin
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitriy I.Cherkashin @ 2006-09-22 23:09 UTC (permalink / raw)
  To: ecos-discuss

Hi, Wolfgang
I remember this thread, but in January I have some data loss, and don't have
time to study this problem.
Best Regards, Dmitriy I.Cherkashin.

----- Original Message -----
From: Wolfgang Köbler <wolfgang@koebler.com>
To: Dmitriy I.Cherkashin <divch@infoline.su>
Cc: <dch@ucrouter.ru>; <ecos-discuss@ecos.sourceware.org>
Sent: Friday, September 22, 2006 9:31 PM
Subject: Re: [ECOS] AT91RM9200 & eCos - eCos port available or not?



On 22-Sep-2006 Dmitriy I.Cherkashin wrote:
> I am interesting  eCos port for AT91RM9200. It is available now or not?
http://ecos.sourceware.org/ml/ecos-discuss/2006-01/msg00083.html





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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] AT91RM9200 & eCos - eCos port available or not?
  2006-09-22 10:42 AW: " Hoehenleitner, Thomas
@ 2006-09-22 11:40 ` Andrew Lunn
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2006-09-22 11:40 UTC (permalink / raw)
  To: Hoehenleitner, Thomas; +Cc: ecos-discuss, dch

On Fri, Sep 22, 2006 at 12:42:26PM +0200, Hoehenleitner, Thomas wrote:
> 
> http://www.kwikbyte.com/ECosCentric.html
>  
> Sorry for the attached confidential note - I can not avoid it right now.

Thanks. I was thinking of an "OpenSource" port. Obviosuly it won't
have the same quality of testing, support, etc which eCosCentric
provide, but it still could be useful.

         Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-09-22 23:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-20 14:17 [ECOS] jffs2 garbage collect Jürgen Lambrecht
2006-09-20 14:48 ` Andrew Lunn
2006-09-20 15:08   ` Jürgen Lambrecht
2006-09-20 15:25     ` Andrew Lunn
2006-09-21  7:22       ` Jürgen Lambrecht
2006-09-21  7:28         ` Andrew Lunn
2006-09-22  8:15         ` [ECOS] AT91RM9200 & eCos - eCos port available or not? Dmitriy I.Cherkashin
2006-09-22  9:51           ` Andrew Lunn
2006-09-22 17:31           ` Wolfgang Köbler
2006-09-22 23:09             ` Dmitriy I.Cherkashin
2006-09-22 10:42 AW: " Hoehenleitner, Thomas
2006-09-22 11:40 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).