summaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-06-19 18:42:24 +0000
committerjhb <jhb@FreeBSD.org>2012-06-19 18:42:24 +0000
commit571562fffb435a478f0591879dd19fe9227cb52e (patch)
tree141cada499e4a3898e0f0daa125723e411568387 /sbin/dumpfs
parente551b0ecfb98653b427343a9dc4e018566a78913 (diff)
downloadFreeBSD-src-571562fffb435a478f0591879dd19fe9227cb52e.zip
FreeBSD-src-571562fffb435a478f0591879dd19fe9227cb52e.tar.gz
Further refine the implementation of POSIX_FADV_NOREUSE.
First, extend the changes in r230782 to better handle the common case of using NOREUSE with sequential reads. A NOREUSE file descriptor will now track the last implicit DONTNEED request it made as a result of a NOREUSE read. If a subsequent NOREUSE read is adjacent to the previous range, it will apply the DONTNEED request to the entire range of both the previous read and the current read. The effect is that each read of a file accessed sequentially will apply the DONTNEED request to the entire range that has been read. This allows NOREUSE to properly handle misaligned reads by flushing each buffer to cache once it has been completely read. Second, apply the same changes made to read(2) by r230782 and this change to writes. This provides much better performance in the sequential write case as it allows writes to still be clustered. It also provides much better performance for misaligned writes. It does mean that NOREUSE will be generally ineffective for non-sequential writes as the current implementation relies on a future NOREUSE write's implicit DONTNEED request to flush the dirty buffer from the current write. MFC after: 2 weeks
Diffstat (limited to 'sbin/dumpfs')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud