On Fri, May 16, 2008 at 10:01:38AM -0700, Christoph Lameter wrote:
Defragmentation is triggered as part of the usual memory reclaim
process. Which implies we've run out of free memory, correct?
filemap_fdatawrite_range() perhaps?
Pushing write-around into a method that is only supposed to write
the single page that is passed to it is a pretty bad abuse of the
API. Especially as we have many simple, ranged writeback methods
you could call. filemap_fdatawrite_range(), do_writepages(),
->writepages, etc.
FWIW, look at the mess of layering violations that write clustering
causes in XFS because we have to do this to keep allocation overhead
and fragmentation down to a minimum. It's a nasty hack to mitigate
the impact of the awful I/O patterns we see from the VM - suggesting
that all filesystems do this just so you don't have to call a
slightly smarter writeback primitive is insane....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
--