Change the autoflush code to autoflush when a flush group reaches a
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 23 Sep 2008 21:03:52 +0000 (21:03 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 23 Sep 2008 21:03:52 +0000 (21:03 +0000)
commit21fde338acc9f79a41d32f22eaa801d5330f34c7
tree261b7982f4548cf07786363f187f8ab26be038a5
parent1d727bac5ba47d4ea407a72ede506d0a452755ae
Change the autoflush code to autoflush when a flush group reaches a
certain point rather then trying to do it from the reclaim code.  This
smooths out the flush sequences.  The default is 2000, adjustable via
the vfs.hammer.autoflush sysctl.

Move hammer_inode_waitreclaims() calls.  In particular, remove the calls
in the VOP_CLOSE() path.  The problem with waiting for excessive reclaims to
drop in these paths is that the inode/vnode operation in question is probably
cached.  Thus unrelated programs, even those just opening /dev/null (if /dev
is on a HAMMER filesystem), can wind up blocking in hmrrcm for no good reason.

Instead defer the hammer_inode_waitreclaims() call to the end of the
transaction code if a new inode had to be created during the transaction.
Thus we tend to block on operations that did not have previously cached
vnodes to work with instead of operations on cached vnodes.

Reported-by: Hasso Tepper <hasso@estpak.ee>
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_prune.c
sys/vfs/hammer/hammer_transaction.c
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer/hammer_vnops.c