linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* jffs2 freezing in gc for long time...
@ 2005-06-16 12:56 David Jander
  2005-06-16 13:12 ` Per Hallsmark
  0 siblings, 1 reply; 3+ messages in thread
From: David Jander @ 2005-06-16 12:56 UTC (permalink / raw)
  To: 'linuxppc-embedded@ozlabs.org'


Hi list,

I have the following situation:

CPU: MPC852T-100MHz
Flash: 32Mbyte mirror-bit, 15Mbyte jffs2 partition rw-mouted
Kernel: 2.4.25 (linuxppc_2_4_devel CVS from denx from a month ago or so, with 
custom patches not concerning MTD at all). For completeness, it contains the 
file fs/jffs2/gc.c version: gc.c,v 1.145 2005/02/09 09:09:01

Sometimes, I get this:
During boot, mounting is quick, but when starting syslogd, it freezes for some 
20 minutes, then syslogd returns an error (exit!=0) but the daemon keeps 
running in background, as well as the garbage collection thread from jffs2 
for some additional minutes. During that time, everything like "ls -l" on a 
certain directory of the flash partition freezes (status D is ps aux) until 
the GC thread has finished.

I can understand that GC has to occur at some time, but is it normal that it 
takes THAT long???

Is there a newer version of the MTD driver that does not present these 
symptoms?

If this is supposed to work like that, I would say jffs2 is pretty useless for 
any embedded system, so it is not supposed to be like that, right? RIGHT??

What am I doing wrong? Is the flash partition too big? Shouldn't I be using 
jffs2?

Any advice is appreciated...

Greetings,

-- 
David Jander

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

* Re: jffs2 freezing in gc for long time...
  2005-06-16 12:56 jffs2 freezing in gc for long time David Jander
@ 2005-06-16 13:12 ` Per Hallsmark
  2005-06-16 13:46   ` David Jander
  0 siblings, 1 reply; 3+ messages in thread
From: Per Hallsmark @ 2005-06-16 13:12 UTC (permalink / raw)
  To: 'linuxppc-embedded@ozlabs.org'

Hi David,

A hot tip would be to configure either syslog to log to a logserver
or at least mount a tmpfs filesystem on /var/log.
Running a syslog could wear out the flash quite quickly, especially
during the development phases...

While you are at it, mount tmpfs's on /tmp and /var as well.

I believe JFFS2 suits very well in a embedded device, the system
just need to be configured for a such, since a "standard" linux
installation are more outlined for server/desktop usage ;-)

Regards,
Per

-----Original Message-----
From: David Jander <david.jander@protonic.nl>
To: "'linuxppc-embedded@ozlabs.org'" <linuxppc-embedded@ozlabs.org>
Date: Thu, 16 Jun 2005 14:56:43 +0200
Subject: jffs2 freezing in gc for long time...

> 
> Hi list,
> 
> I have the following situation:
> 
> CPU: MPC852T-100MHz
> Flash: 32Mbyte mirror-bit, 15Mbyte jffs2 partition rw-mouted
> Kernel: 2.4.25 (linuxppc_2_4_devel CVS from denx from a month ago or
> so, with 
> custom patches not concerning MTD at all). For completeness, it
> contains the 
> file fs/jffs2/gc.c version: gc.c,v 1.145 2005/02/09 09:09:01
> 
> Sometimes, I get this:
> During boot, mounting is quick, but when starting syslogd, it freezes
> for some 
> 20 minutes, then syslogd returns an error (exit!=0) but the daemon
> keeps 
> running in background, as well as the garbage collection thread from
> jffs2 
> for some additional minutes. During that time, everything like "ls -l"
> on a 
> certain directory of the flash partition freezes (status D is ps aux)
> until 
> the GC thread has finished.
> 
> I can understand that GC has to occur at some time, but is it normal
> that it 
> takes THAT long???
> 
> Is there a newer version of the MTD driver that does not present these 
> symptoms?
> 
> If this is supposed to work like that, I would say jffs2 is pretty
> useless for 
> any embedded system, so it is not supposed to be like that, right?
> RIGHT??
> 
> What am I doing wrong? Is the flash partition too big? Shouldn't I be
> using 
> jffs2?
> 
> Any advice is appreciated...
> 
> Greetings,
> 
> -- 
> David Jander
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

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

* Re: jffs2 freezing in gc for long time...
  2005-06-16 13:12 ` Per Hallsmark
@ 2005-06-16 13:46   ` David Jander
  0 siblings, 0 replies; 3+ messages in thread
From: David Jander @ 2005-06-16 13:46 UTC (permalink / raw)
  To: linuxppc-embedded

On Thursday 16 June 2005 15:12, Per Hallsmark wrote:
> A hot tip would be to configure either syslog to log to a logserver
> or at least mount a tmpfs filesystem on /var/log.

We do this already.... the old way, with a ramdisk mounted on /var, and the 
rw-jffs2 partition mounted on /flash, then /var/log/xxx is a link to a 
directory in /flash/log/, where I place "persistent" log files.
/var/log/messages and friends reside on the ramdisk only.
/tmp is a symlink to /var/tmp.
Well, the use of tmpfs is indeed easier, so thanks anyway for the tip.

> Running a syslog could wear out the flash quite quickly, especially
> during the development phases...

That's true, but we need some logfiles (logged via syslogd) to be persistent 
and survive reboots at any moment, but we can't afford a system freeze just 
because the GC-routine needs to run.
I still need to study syslogd, to see what it does when writing becomes 
blocked for a long time. Does syslogd buffer? For how much data? Will I loose 
data in the end or will the calling process hang?
If someone has experience with this, and knows the answer to some of these 
questions, I'd be glad to hear it.

Greetings,

-- 
David Jander

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

end of thread, other threads:[~2005-06-16 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-16 12:56 jffs2 freezing in gc for long time David Jander
2005-06-16 13:12 ` Per Hallsmark
2005-06-16 13:46   ` David Jander

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 NNTP newsgroup(s).