Skip to contentSkip to conversation

nfs_readpage

DISCUSSION Rajat 2 participants 2 messages Jun 25, 2007

Subsystems (2)
lore
Share & tools
lore

Rajat

author
#0 lore raw

Hi,

I was vading through NFS read calls, and found a call to nfs_wb_page is made to flush any pending writes, in nfs_readpage function. However all pending writeback requests in nfs radix tree are set as PG_uptodate.

Ideally readpage would never be called for any page which is PG_uptodate. In do_generic_mapping_read, if page is found in cache (using find_or_get_page) and is PG_uptodate, the actor method is called to copy it back to userspace buffer.

I tried creating programs (random reads, file mapped I/O) but could not produce any such scenario where nfs_wb_page is being called against current page.

Could someone please help me when a readpage is called and would there be any case where there are pending writeback requests against such pages, which needs to be flushed??

Rajat

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#1 lore raw
Quoted 5 lines · Rajat

Hi,

I was vading through NFS read calls, and found a call to nfs_wb_page is made to flush any pending writes, in nfs_readpage function. However all pending writeback requests in nfs radix tree are set as PG_uptodate.

Wrong. If you write a partial page, then that will not be marked as PG_uptodate.

Trond

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs