[Yaffs] Re: yaffs2 status --> mount speed up
Charles Manning
manningc2@actrix.gen.nz
Tue, 19 Apr 2005 08:58:02 +1200
With the interest in YAFFS speed, I thought I'd take an opportunity to=20
pre-announce some YAFFS2 speed-ups that are in the pipe.
YAFFS2 is generally faster than YAFFS1 when executing for two reasons:
* It does not program deletion markers. This makes things faster when chu=
nks=20
are reprogrammed.
* Chunk/page size is bigger therefore faster programming.
YAFFS2 does not delete chunks (=3D=3D pages) like YAFFS1 does and instead=
figures=20
out the system state by scanning the blocks in their allocation order. Th=
is=20
means that a deleted file would get formed then deleted, all of which tak=
e=20
extra (wasted) time. This means that YAFFS2 is sometimes quite a bit=20
slower than YAFFS1 for mounting, depending on the state of NAND.
Someone using YAFFS2 suggested a change to the scanning policy to speed t=
his=20
scanning up. Instead of scanning forwards in time the proposal was to sca=
n=20
the blocks backwards (ie. most recent allocated block first). Consider t=
he=20
case of the deleted file: we see the file is deleted and then just ignore=
any=20
further references to that file.
Simultaneously with this, I also added an optimisation to store some extr=
a=20
info in the tags for object header chunks. This means that we no longer n=
eed=20
to read the whole chunk to get most of the object header info needed duri=
ng=20
mount scanning.
Together these modifications have shown some huge speedups, typically mu=
ch =20
faster than yaffs(1). They also pave the way for adding "checkpointing" e=
tc.
These speedups are not yet in CVS, but I intend to check them in this wee=
k.
-- Charles