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).