git: hammer2 - Add vfs.hammer2.limit_dirty_inodes

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Apr 17 23:38:30 PDT 2018


commit 33a2f82f253e9f9d6f9c4afd00d6bd71ac1526d0
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Apr 17 23:10:02 2018 -0700

    hammer2 - Add vfs.hammer2.limit_dirty_inodes
    
    * Add vfs.hammer2.limit_dirty_inodes which causes hammer2 to
      immediately begin fsync()ing dirty inodes when the count exceeds
      the limit.  Set a reasonable limit.
    
    * Fixes issues on slower storage when the syncer is unable to
      keep up with the userland frontend, causing the number of
      dirty inodes to increase almost unbounded (limited only by
      kern.maxvnodes).
    
      Allowing a large number of dirty inodes to accumulate can
      can result in a situation where the clean device buffer
      underpinning the dirty inode is discarded by the kernel before
      the filesystem is able to flush it, forcing additional disk reads
      and slowing things down even more.
    
    * Improve the operation of speedup_syncer() by limiting the
      rate at which we call the function.  It is now called a maximum
      of approximately once per tick (each call speeding up a sync
      by one second).

Summary of changes:
 sys/vfs/hammer2/hammer2.h        |  4 ++-
 sys/vfs/hammer2/hammer2_ioctl.c  |  4 +--
 sys/vfs/hammer2/hammer2_vfsops.c | 55 +++++++++++++++++++++++++++++++++++++---
 sys/vfs/hammer2/hammer2_vnops.c  | 46 ++++++++++++++++++++++++---------
 4 files changed, 91 insertions(+), 18 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/33a2f82f253e9f9d6f9c4afd00d6bd71ac1526d0


-- 
DragonFly BSD source repository



More information about the Commits mailing list