[Yaffs] Wide tnode support added
Charles Manning
manningc2 at actrix.gen.nz
Wed Dec 7 22:30:24 GMT 2005
Hi YAFFSers
I have checked in changes for wide tnode support. This speeds up reads on
large NAND arrays, as per the patch that Andre submitted some while back, but
uses a variable size bitmap instead which is far more frugal in its memory
usage.
To explain...
The standard size level0 tnodes are 16-bits wide. That allows you to uniquely
identify up to 64k "chunks". For 512-byte page devices that maxes out at 32MB
(64k * 512). To handle larger devices YAFFS uses the concept of chunk groups.
For example, on 128MB devices that means we can use the level0 tnode to
identify a group of 4 chunks and then search for the chunk we want. This
searching gets slower for larger devices as the chunk group size increases.
The Bluewater guys did a hack where they used 32-but tnodes. Far bigger than
needed, but no more searching required.
The changes just checked in use a variable size bitmap instead. At
initialisation, the tnode width is calculated (minimum 16 bits) and
allocations and bitshuffling are matched to that size. This means we get a
lot of performance improvement for large arrays with a slight increase in
memory usage.
See how it goes...
-- Charles
More information about the yaffs
mailing list