Re: mmap over nfs leads to excessive system load

From: Trond Myklebust
Date: Wed Nov 16 2005 - 17:23:19 EST

On Wed, 2005-11-16 at 14:10 -0800, Andrew Morton wrote:

> > How is the filesystem supposed to distinguish between the cases
> > "VM->writepage()", and "VM->writepages->mpage_writepages->writepage()"?
> >
> Via the writeback_control, hopefully.
> For write_one_page(), sync_mode==WB_SYNC_ALL, so NFS should start the I/O
> immediately (it appears to not do so).

Sorry, but so does filemap_fdatawrite(). WB_SYNC_ALL clearly does not
discriminate between a writepages() and a single writepage() situation,
whatever the original intention was.

> For vmscan->writepage, wbc->for_reclaim is set, so we know that the IO
> should be pushed immediately. nfs_writepage() seems to dtrt here.
> With the proposed changes, we don't need that iput() in nfs_writepage().
> That worries me because I recall from a couple of years back that there are
> really subtle races with doing iput() on the vmscan->writepage() path.
> Cannot remember what they were though...

Possibly to do with block filesystems that may trigger ->writepage()
while inside iput_final()? NFS can't do that.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at