[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Node cache too large

Good timing, I have the same problem.
Here's a small script to reproduce the problem:

cat /proc/slabinfo
while :; do
  echo "12345678901234567890123456789012345678901234567890" >>

break after a while, check /proc/slabinfo before and after... and gawk.
On my small embedded environment, slab-32 and slab-64 (struct jffs_node)
make up for around 1.7M of RAM!
Output example:  The filesystem already has a file (named bozo)created by
the included script.

# cat /proc/slabinfo
size-64               10     42
size-32              123    126

# mount -t jffs /dev/mtdblock3 /flash
# cat /proc/slabinfo
size-64            10189  13776
size-32            24088  27657

# rm /flash/bozo
# cat /proc/slabinfo
size-64             6899  13776
size-32            17313  27657

# umount /flash
# cat /proc/slabinfo
size-64               10  13776
size-32             7018  27657

Possible solutions:
- Create a slab cache for jffs_node (save some bytes per entries) instead
of kmalloc() (Band-aid solution)
- Combine small entries into one large node (?) at scan  or GC time?


> -------- Original Message --------
> Subject: Node cache too large
> Date: Tue, 12 Dec 2000 10:41:35 +0000
> From: David Vrabel <dvrabel@xxxxxxx.uk>
> To: jffs-dev@xxxxxxx.com
> Hi,
> I've been taken a look at the node cache code which somebody posted to
> this list a few months ago.  There is a major problem in that the node
> cache grows too large is there is a large number of files/nodes.  Has
> anybody else found this problem and resolved it.
> As far as I can tell (and that's not very far since I know next to
> nothing about how JFFS and the node cache stuff works) it's writting a
> jffs_node for each node which appears to contain unitialized pointers
> which would be pointless to write out.
> Alternatively does anybody have any other ideas about how to reduce
> mount times.
> David Vrabel

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com