> -----Original Message-----
> From: yaffs-bounces@lists.aleph1.co.uk [mailto:yaffs-
> bounces@lists.aleph1.co.uk] On Behalf Of rogerz zhang
> Sent: Tuesday, 24 February 2009 12:56 PM
> To: yaffs@lists.aleph1.co.uk
> Subject: [Yaffs] mounting large yaffs device takes a long time?
>
> Hi:
>
> I'm using yaffs on a 6×1GB nandflash array. When the disk is full of
> files, it takes as long as 2-3 minutes to mount it. I did a simple
> profiling and found out yaffs_Scan and yaffs_Scanback costs most of the
> time.
>
> Is there any way to improve the scanning speed on large yaffs device?
>
I think you'd find that most of the time spent in _Scan and _Scanback was I/O time, not CPU time. So to speed up the scan, you could either:
1) make I/O faster, or
2) do less I/O.
Option 1 could be something like a readahead or parallel access system - you say it's an array of 6 devices, so if they're interleaved correctly, you should be able to read out 6 pages simultaneously. The block size you use could also affect things.
Option 2 would be something like the checkpointing feature. I haven't tried that myself, but it's intended to greatly reduce the amount of scanning required. You might want to find out how to get it enabled and working.
James