Hi All,
 
I'm run into the problem with GC usage in yaffs2, which is causing the lower write performance.
 
When the disk(NAND) is in fully erased state(i.e, 0% usage), i will get the higher write performance,
but as the usage increases, performance is gradually decreases. I am just trying to copy some files,
delete and then copy again.
 
I also did an experiment by commenting GC during file write, which leads to consistently higher
performance. From this its clear that GC is the one which is causing the problem.
 
I am thinking of following approaches to address this issue. Please correct me if  i'm wrong
 
1. I tried the GC during SoftDeleteWorker context.
    i.e, in the function "yaffs_SoftDeleteChunk" after incrementing the "softdeletion" parameter
    of the block information, call yaffs_CheckGarbageCollection
 
    I have tried this method to minimise the GC load during file write (i.e, the load on
    yaffs_WriteChunkDataToObject)
 
2. While observed during Garbage Collection that, even if the pagesInUse of a block becomes ZERO
    (i.e, bi->pagesInUse - bi->softDeletions in " yaffs_FindBlockForGarbageCollection" function,), in
    function   yaffs_GarbageCollectBlock, we are reading all the chunks and decrement the nDataChunks
    counter of the correcponding object. 
 
    I am just wondering is it possible to remove this overhead (reading all the chunks while the pagesInUse
    of that block is zero) by updating the nDataChunks counter while softDelete of the corresponding object,
   and erase the block directly while the pagesInUse of that block are zero.
 
Also i am wondering, will the above two approaches cause any abnormal behaviour in any other context.
 
Thanks,
Asif
 


-------------------------------------------------------DISCLAIMER------------------------------------------------------
The information transmitted herewith is confidential and proprietary information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
--------------------------------------------------------------------------------------------------------------------------------

Please do not print this email unless it is absolutely necessary. Spread environmental awareness.