public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sync on pages containing EOF
@ 2001-02-20 19:54 Rajagopal Ananthanarayanan
  0 siblings, 0 replies; only message in thread
From: Rajagopal Ananthanarayanan @ 2001-02-20 19:54 UTC (permalink / raw)
  To: linux-kernel, torvalds


I was looking at some code to deal with sync (eg. sys_fsync(fd)).
Generally, sync is performed by calling filemap_fdatasync(...)
which does writepage() on pages in the dirty list of the inode,
and then using filemap_fdatawait to wait on the I/O's started by
the writepage's.

Consider writepage() on a (partial) page containing EOF. In this case,
prepare_write/commit_write is employed to write the page out.
However, commit_write will only mark the buffer dirty, and
not actually start the I/O. Subsequently, either memory pressure
(page_launder) or write pressure (flush_dirty_buffers) will
start the I/O on the EOF-page. So, it appears that filemap_fdatawait
will be delayed.

I'm just wondering if this argument is correct ...

-- 
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-02-20 19:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-20 19:54 sync on pages containing EOF Rajagopal Ananthanarayanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox