Re: infinite loop? with mmap, nfs, pwrite, O_DIRECT
From: Andrew Morton
Date: Mon Nov 21 2005 - 18:34:52 EST
Trond Myklebust <trond.myklebust@xxxxxxxxxx> wrote:
>
> Anything that calls lock_page() should be avoided in O_DIRECT,
Why?
And it's still doing lock_page():
nfs_file_direct_write()
->filemap_fdatawrite()
->do_writepages()
->nfs_writepages()
->generic_writepages()
->mpage_writepages()
->lock_page()
> however
> we should be able to call invalidate_inode_pages() since that doesn't
> wait on the page lock.
invalidate_inode_pages2() is better. And using generic_file_direct_IO() is
better still, since it handles mmap coherency and only work upon that part
of the file which is actually undergoing IO.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/