JFFS2 Garbage collection issue
Joakim Tjernlund
joakim.tjernlund at transmode.se
Wed Nov 27 05:23:25 EST 2013
"linux-mtd" <linux-mtd-bounces at lists.infradead.org> wrote on 2013/11/27
11:11:04:
>
> Hi all,
>
> we are currently facing a problem with the Garbage-collection on a JFFS2
> file system.
>
> We have an embedded linux system based on an ARM9 AT91RM9200 processor
> with an Intel / Micron JS28F256 NOR-flash of 32MB in size.
> The Flash holds the U-Boot loader and its environment and in the main
> part (30MB) of the chip a JFFS2-based root-file-system.
> Our Linux kernel version is 2.6.24.3
>
> Some minutes after startup of the system, the garbage collector (gc.c)
> does a scan of the file system, gathering information for the garbage
> collection procedures that may be initiated based upon that data.
> On some file systems, especially such with long runtime and therefore
> many file operations, this scan consumes a lot of time. On some systems
> it stays in that scan for more that 10 minutes. The problem with this
> behaviour is the fact, that during the scan the file system is locked,
> and therefore all file operations are suspended. This leads to a crash
> of the system, when the application program hangs for a long time,
> waiting for a file operation to return from a system call, and the
> watchdog is not triggered.
>
> In a test system without watchdog, after the scan, the system runs
normally.
> The flash chip itself shows no errors, so it seems to be a problem of
> the file system.
>
> Any idea or suggestion to solve the problem would be very welcome!
The simple fix is to send a signal(SIGCONT?) to the GC process regularly
to do GC
over time. That way you don't get all GC at boot time.
Jocke
More information about the linux-mtd
mailing list