git: kernel - Attempt to fix cluster pbuf deadlock on recursive filesystems

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Nov 7 19:04:54 PST 2016


commit d84f6fa13c474015da98ec341ce61ed6d737bcae
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Nov 7 18:56:34 2016 -0800

    kernel - Attempt to fix cluster pbuf deadlock on recursive filesystems
    
    * Change global pbuf count limits (used primarily for clustered I/O) to
      per-mount and per-device limits.  The per-mount / per-device limit
      is set to nswbuf_kva / 10, allowing 10 different entities to obtain
      pbufs concurrently without interference.
    
    * This change goes a long way towards fixing deadlocks that could occur
      with the old global system (a global limit of nswbuf_kva / 2) when
      the I/O system recurses through a virtual block device or filesystem.
      Two examples of virtual block devices are the 'vn' device and the crypto
      layer.
    
    * We also note that even normal filesystem read and write I/O strategy calls
      will recurse at least once to dive the underlying block device.  DFly also
      had issues with pbuf hogging by one mount causing unnecessary stalls
      in other mounts.  This fix also prevents pbuf hogging.
    
    * Remove unused internal O_MAPONREAD flag.
    
    Reported-by: htse, multiple
    Testing-by: htse, dillon

Summary of changes:
 sys/kern/vfs_cluster.c    | 43 +++++++++++++++++++++++++++++++++++--------
 sys/kern/vfs_conf.c       |  1 +
 sys/kern/vfs_lock.c       |  1 +
 sys/kern/vfs_mount.c      |  2 ++
 sys/kern/vfs_syscalls.c   |  1 +
 sys/kern/vfs_vnops.c      |  2 +-
 sys/sys/buf.h             |  6 ++++++
 sys/sys/fcntl.h           | 10 ++++++----
 sys/sys/mount.h           |  2 +-
 sys/sys/vnode.h           |  1 +
 sys/vfs/ufs/ffs_rawread.c | 20 +++++++-------------
 sys/vm/vm_pager.c         | 44 ++++++++++++++------------------------------
 12 files changed, 76 insertions(+), 57 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d84f6fa13c474015da98ec341ce61ed6d737bcae


-- 
DragonFly BSD source repository


More information about the Commits mailing list