git: DragonFly_RELEASE_4_6 kernel - repurpose buffer cache entries under heavy I/O loads

Matthew Dillon dillon at
Sat Jul 23 21:00:54 PDT 2016

commit cd31df9f71c2673404f2ba89c447f0da9560e940
Author: Matthew Dillon <dillon at>
Date:   Mon Jul 18 18:27:12 2016 -0700

    kernel - repurpose buffer cache entries under heavy I/O loads
    * At buffer-cache I/O loads > 200 MBytes/sec (newbuf instantiations, not
      cached buffer use), the buffer cache will now attempt to repurpose the
      VM pages in the buffer it is recycling instead of returning the pages
      to the VM system.
    * sysctl vfs.repurposedspace may be used to adjust the I/O load limit.
    * The repurposing code attempts to free the VM page then reassign it to
      the logical offset and vnode of the new buffer.  If this succeeds, the
      new buffer can be returned to the caller without having to run any
      SMP tlb operations.  If it fails, the pages will be either freed or
      returned to the VM system and the buffer cache will act as before.
    * The I/O load limit has a secondary beneficial effect which is to reduce
      the allocation load on the VM system to something the pageout daemon can
      handle while still allowing new pages up to the I/O load limit to transfer
      to VM backing store.  Thus, this mechanism ONLY effects systems with I/O
      load limits above 200 MBytes/sec (or whatever programmed value you decide
    * Pages already in the VM page cache do not count towards the I/O load limit
      when reconstituting a buffer.

Summary of changes:
 sys/kern/vfs_bio.c                 | 156 ++++++++++++++++++++++++++++++-------
 sys/platform/pc64/x86_64/machdep.c |   2 +-
 sys/sys/buf.h                      |   2 +-
 sys/vm/vm_page.c                   |  17 +++-
 sys/vm/vm_page.h                   |   2 +-
 5 files changed, 145 insertions(+), 34 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list