git: hammer2 - Fix inode & chain limits, improve flush pipeline.
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Jan 30 15:49:00 PST 2020
commit d0e99d5ddb6a001850be2dff41813e1cad00b5af
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Jan 30 15:40:01 2020 -0800
hammer2 - Fix inode & chain limits, improve flush pipeline.
* Reorganize VFS_MODIFYING() to avoid certain deadlock conditions and
adjust hammer2 to unconditionally stall in VFS_MODIFYING() when dirty
limits are exceeded.
Make sure VFS_MODIFYING() is called in all appropriate filesystem-
modifying paths.
This ensures that inode and chain structure allocation limits are
adhered to.
* Fix hammer2's wakeup code for the dirty inode count hystereis. This
fixes a situation where stalls due to excessive dirty inodes were waiting
a full second before resuming operation based on the dirty count
hysteresis.
The hysteresis now works as intended:
(1) Trigger a sync when the dirty count reache 50% N.
(2) Stall the frontend when the dirty count reaches 100% N.
(3) Resume the frontend when the diirty count drops to 66% N.
* Fix trigger_syncer() to guarantee that the syncer will flush the
filesystem ASAP when called. If the filesystem is already in a flush,
it will be flushed again.
Previously if the filesystem was already in a flush it would wait one
second before flushing again, which significantly reduces performance
under conditions where the dirty chain limit or the dirty inode limit is
constantly being hit (e.g. chown -R, etc).
Reported-by: tuxillo
Summary of changes:
sys/kern/kern_fp.c | 2 +-
sys/kern/vfs_default.c | 6 ++-
sys/kern/vfs_sync.c | 27 ++++++++-----
sys/kern/vfs_syscalls.c | 13 +++---
sys/kern/vfs_vnops.c | 48 ++++++++++++++--------
sys/sys/mount.h | 2 +-
sys/sys/vnode.h | 2 +-
sys/vfs/hammer2/hammer2.h | 2 +-
sys/vfs/hammer2/hammer2_chain.c | 10 +++--
sys/vfs/hammer2/hammer2_flush.c | 2 +-
sys/vfs/hammer2/hammer2_strategy.c | 2 +-
sys/vfs/hammer2/hammer2_vfsops.c | 83 ++++++++++++++++++++++++--------------
sys/vfs/hammer2/hammer2_vnops.c | 10 -----
sys/vfs/nfs/nfs_serv.c | 3 +-
sys/vfs/nullfs/null_vfsops.c | 17 +++++++-
15 files changed, 143 insertions(+), 86 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d0e99d5ddb6a001850be2dff41813e1cad00b5af
--
DragonFly BSD source repository
More information about the Commits
mailing list