Database on JFFS2?

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Apr 16 11:23:16 EDT 2003


On Wed, 16 April 2003 10:17:49 -0400, Dave Ellis wrote:
> 
> I have also seen poor performance with jffs2 and a ramdisk. At first
> writes are fast, but after a little while there are pauses of almost
> 5 seconds for a single write. Then it is fast again for less than a 
> second, then the big pause. The problem is worse with a small (512K)
> ramdisk. I don't think it is possible to write to flash fast enough
> to cause the problem.
> 
> The problem is that garbage collection only puts the block to erase
> on the erase list. It then triggers the erase by marking the superblock
> dirty. It can be up to 5 seconds later (with default kupdate times)
> when kupdate writes the superblock and starts the erase.
> 
> I don't want to run kupdate 10 times a second, so I patched nodemgmt.c
> to do the erase directly for MTD_RAM devices. This solves the problem,
> but I am not sure if it is the right (or even safe) solution.

Interesting patch. Thanks!

> +			if (c->mtd->type == MTD_RAM) {

It might be cleaner to put another capability in the flags field, set
it for MTD_RAM and do something like this

			if (c->mtd->flags & MTD_DIRECT_ERASE) {

Jörn

-- 
Do not stop an army on its way home.
-- Sun Tzu



More information about the linux-mtd mailing list