> > 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 :-). > Thanks for the info. I could investigate some more and may be update the profiling info. For nPageReads, does incrementing the counter for the else part [above] fix the bug ? These were the only two places where I found an entry point into lower level mtd page writes. thanks, -siddharth ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7