[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Expected behavior of JFFS?
On Wed, 10 Jan 2001, Martin Gadbois wrote:
> I still need to do more tests with that. Plus, is the count of all files done
> in thread_should_wake() a performance issue?
Quite possibly, although we should probably profile it to make sure.
thread_should_wake() is called from jffs_garbage_collect_trigger(), which
is called every time jffs_insert_node() is called.
If you just enable the counting of no_jffs_file unconditionally, then you
get that information for nothing. We've already done the same thing for
> 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.
> Enhancements welcome....
First priority is to ensure that we never do what happened to Mark, and
cause GC to go on endlessly when there's nothing to do. It's best to err
on the side of caution.
Perhaps you could keep a record for each file of whether it's stored
optimally or not. And a global count of the number of files which are in
this suboptimal state. If that count exceeds a certain percentage of the
number of files, then trigger GC?
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to firstname.lastname@example.org