]> 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, 2 Dec 2011 03:12:03 +0000 (14:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Dec 2011 03:59:25 +0000 (14:59 +1100)
commit07093eb5a4329e51fca2c05a25f5cb5f0ed52990
tree0efa1b4e851b4ada7cb1bf2f9e670ff3c0644aea
parentbb5d418e60fb126f69853c56f2d6d4feb4b7fc83
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