]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fadvise: only initiate writeback for specified range with FADV_DONTNEED
authorShawn Bohrer <sbohrer@rgmadvisors.com>
Thu, 8 Dec 2011 04:41:47 +0000 (15:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 9 Dec 2011 04:52:36 +0000 (15:52 +1100)
commite642cd53bb9fef012f8783bf32d2d7f756e1e48f
tree5631c3ad7f61cb49c784a33eb24b55d3a7847ce3
parented97b4f9a6a0c925c7dfde5cc6cf2bfe25f36aff
fadvise: only initiate writeback for specified range with FADV_DONTNEED

Previously POSIX_FADV_DONTNEED would start writeback for the entire file
when the bdi was not write congested.  This negatively impacts performance
if the file contians dirty pages outside of the requested range.  This
change uses __filemap_fdatawrite_range() to only initiate writeback for
the requested range.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/fadvise.c