[Yaffs] yaffs2 /proc nPageReads

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Siddharth Choudhuri
Date:  
To: yaffs
Subject: [Yaffs] yaffs2 /proc nPageReads
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.

thanks in advance,
-siddharth



____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/