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

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Jul 22 11:39:44 PDT 2016


commit 962f16a7bf52208573e87485f9d477e652bb34bf
Author: Matthew Dillon <dillon at apollo.backplane.com>
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
      on).
    
    * 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(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/962f16a7bf52208573e87485f9d477e652bb34bf


-- 
DragonFly BSD source repository



More information about the Commits mailing list