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 Garbage Collection Error?


I see the garbage collection code get called every couple of hundred
files or so.  It is only in the (rare?) case that during gc
jffs2_garbage_collect_dnode() gets called that I see trouble.

In jffs2/current/src/nodemgmt.c:jffs2_do_reserve_space(), there is the
snippet:

#ifdef __ECOS
/* In eCos, we don't have a handy kernel thread doing the erases for
   us. We do them ourselves right now. */
   jffs2_erase_pending_blocks(c);
#else

which I do see get called.  So it looks like the absence of a gc thread
has been accounted for.

I haven't cross-posed to an JFFS2 boards.  I guess thats next.

Scott

On Tue, 2003-07-08 at 15:44, Gary D. Thomas wrote:
> Scott Wilkinson said:
> > Hi All,
> >
> > I have been running JFFS2 tests on both the Linux Synthetic Target (with
> > synthetic flash driver) and on a PPC embedded system.  I have a simple
> > test which loops forever doing the following:
> >
> > for (N=0;;N++)
> > {
> >   a) Create File(N), fill with known pattern
> >   if (N>0)
> >   {
> >     b) Open File(N-1), verify known pattern
> >     c) Delete File(N-1)
> >   }
> > }
> >
> > What I see is that on both the synthetic and real target the exact same
> > behavior happens.  Everything works fine until the first time that
> > jffs2_garbage_collect_dnode() gets called.  A few more calls down the
> > stack and I take and exception caused by rb_remove_color dereferencing a
> > null pointer.
> >
> > Has anyone seen anything like this?  If you are successfully using
> > JFFS2, have you ever seen jffs2_garbage_collect_dnode() get called?
> >
> > I have attached the test code I'm using.  For the synthetic target I
> > have the flash configured to be 8 sectors of 65536 bytes each.  In this
> > case it fails when N = 2797.
> >
> > I am not really sure where to start looking.  I have actually merged the
> > latest jffs2 code from www.intradead.org and it runs(!) but didn't fix
> > the problem :(.
> >
> 
> The JFFS2 garbage collection is a known issue - for example,
> the timer which is supposed to kick off things (based on the
> Linux 'jiffies') is not well defined, etc.
> 
> Have you asked the JFFS2 folks (David Woodhouse in particular)
> about these problems?  He might have more insight.
> 
> .--------------------------------------------------------.
> |       Mind: Embedded Linux and eCos Development        |
> |--------------------------------------------------------|
> | Gary Thomas              email:  gary.thomas@mind.be   |
> | Mind ( http://mind.be )  tel:    +1 (970) 229-1963     |
> | gpg: http://www.chez-thomas.org/gary/gpg_key.asc       |
> '--------------------------------------------------------'


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