On Saturday 25 August 2007 11:53:42 Siddharth Choudhuri wrote: > Hi, > > I was looking at the nPageReads counter. It gets incremented inside of > yaffs_ReadChunkFromNAND() function. Following the function call chain this > could be in the following case (assuming page not in cache). > yaffs_readpage() -> ... -> yaffs_ReadChunksWithTagsFromNAND(). Inside > yaffs_ReadChunkFromNAND function there is the following if statement: > > if (dev->readChunkWithTagsFromNAND) > result = dev->readChunkWithTagsFromNAND(); > else > result = yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(); > > Now my question is why is nPageRead incremented in the else case [i.e., > else condition eventually calls yaffs_ReadChunkFromNAND() which increments > nPageReads] and not in the if case. Looking at the source code, the if > condition also leads to a function - nandmtd2_ReadChunkWithTagsFromNAND() > which does a low level mtd->read(). > > Am I missing something here ? Basically, I wanted a count of how many NAND > read pages come from the file system and how many are due to flash > management. No I don't think you are missing something. This is a low-flying bug. The history is that the read/write/erase counting were added a long while ago for a once-off profiling exercise and was not kept current. Probably should be fixed :-). -- CHarles > > thanks in advance, > -siddharth > > > > ___________________________________________________________________________ >_________ Need a vacation? Get great deals > to amazing places on Yahoo! Travel. > http://travel.yahoo.com/ > > _______________________________________________ > yaffs mailing list > yaffs@lists.aleph1.co.uk > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs