]> 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>
Fri, 16 Dec 2011 04:49:52 +0000 (15:49 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 19 Dec 2011 07:19:27 +0000 (18:19 +1100)
commit660c965159e603307e218135b7242f4d7899d86c
tree499c3ea8e7eacfd6e4f21c12f3873dc2ccb134af
parentfd860108d30c711b0533d10baf62e4dc06e7d60d
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