]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r235230
authoralc <alc@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 24 May 2012 03:38:47 +0000 (03:38 +0000)
committeralc <alc@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 24 May 2012 03:38:47 +0000 (03:38 +0000)
commit0c88445fd93ec069088e15fc55fa7d2971eced0f
treea7938e6569ac477b43a2d58c6684bf0953aec021
parentf25032d68e80037b6a0b6d0127f0e981c96012c0
MFC r235230
  Give vm_fault()'s sequential access optimization a makeover.

  There are two aspects to the sequential access optimization: (1) read ahead
  of pages that are expected to be accessed in the near future and (2) unmap
  and cache behind of pages that are not expected to be accessed again.  This
  revision changes both aspects.

  The read ahead optimization is now more effective.  It starts with the same
  initial read window as before, but arithmetically grows the window on
  sequential page faults.  This can yield increased read bandwidth.  For
  example, on one of my machines, a program using mmap() to read a file that
  is several times larger than the machine's physical memory takes about 17%
  less time to complete.

  The unmap and cache behind optimization is now more selectively applied.
  The read ahead window must grow to its maximum size before unmap and cache
  behind is performed.  This significantly reduces the number of times that
  pages are unmapped and cached only to be reactivated a short time later.

  The unmap and cache behind optimization now clears each page's referenced
  flag.  Previously, in the case of dirty pages, if the containing file was
  still mapped at the time that the page daemon examined the dirty pages,
  they would be reactivated.

  From a stylistic standpoint, this revision also cleanly separates the
  implementation of the read ahead and unmap/cache behind optimizations.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235876 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/vm/vm_fault.c
sys/vm/vm_map.c
sys/vm/vm_map.h