[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Expected behavior of JFFS?
The choice is pretty arbitrary. I did found some problems on partitions with a
small amount of files. I therefore tried to take into consideration the number
of files that the system had.
This line is now: (not deposited on CVS)
if (jffs_get_node_inuse() > (c->fmc->used_size/c->fmc->max_chunk_size * 5
+ jffs_foreach_file(c, jffs_file_count) * 2 + 25))
I still need to do more tests with that. Plus, is the count of all files done
in thread_should_wake() a performance issue?
The logic behind the formula is to see if the node_inuse() if far greater (*5)
than the theoritical perfection: used_size/chunk_size. I added a arbitrary
constant, to avoid GC on almost empty FS. In cases with lots of small files,
I now count the number of files and assign two nodes each.
David Woodhouse wrote:
> > and maybe some others, I'm not exactly sure where the cycle starts.
> > I do know that it does not seem to end, even after leaving the machine
> > running over a 4 day weekend. In the process, the free space
> > remaining on the flash drive dropped 54 Kbytes, even though I wasn't
> > doing anything and none of the daemons should have been writing to
> > the flash drive.
> Update to v1.87 of intrep.c and change the #if 1 at line 3012 to #if 0.
> I think it's doing GC in an endless loop because it thinks it's using too
> much memory for fs nodes, but its condition can never be met.
> Martin? Can you comment on the choice of threshold?
Colubris Networks (http://www.colubris.com)
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to email@example.com