Re: [Yaffs] Tweaking yaffs2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] Tweaking yaffs2
On Friday 21 December 2007 00:38:33 Zavi wrote:
> Is there a way to tweak RAM usage in yaffs2?
> From what I understand the tnodes tree is the main consumer of RAM.
> So reducing the number of Short op caches and Temp buffers will not be
> very helpful when a large portion of the flash memory is occupied with
> data.
>
> Is there a way to make the tree less detailed (smaller in depth), and
> by doing so to reduce the RAM usage at the cost of more device
> accesses?
> Or does yaffs have to work with full trees in RAM?


At the moment yes, it does need everything in RAM. It is possible to extend
yaffs to load trees on demand, but that would require significant
development.

One "trick" is to increase the chunk size. The number of tnodes in a file's
tree is roughly proportional to the number of chunks in the file. Therefore
using larger chunks cuts down on the number of chunks and reduces the ram
footprint. For example, if you have 2k-page NAND and use "virtual pages" of
4k then you would approximately halve the RAM usage.


-- Charles