]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Restructuring of the soft updates code to set it up so that the
authormckusick <mckusick@FreeBSD.org>
Mon, 21 Oct 2013 00:28:02 +0000 (00:28 +0000)
committermckusick <mckusick@FreeBSD.org>
Mon, 21 Oct 2013 00:28:02 +0000 (00:28 +0000)
commit62bcc54df063fa9f9b23a1fc654544a438bdcaaf
treec9b165cd5b1dc7f814f67fe898fdab74649119d4
parent1907ae54f114fb93c693357f584a6395bdfdb091
Restructuring of the soft updates code to set it up so that the
single kernel-wide soft update lock can be replaced with a
per-filesystem soft-updates lock. This per-filesystem lock will
allow each filesystem to have its own soft-updates flushing thread
rather than being limited to a single soft-updates flushing thread
for the entire kernel.

Move soft update variables out of the ufsmount structure and into
their own mount_softdeps structure referenced by ufsmount field
um_softdep.  Eventually the per-filesystem lock will be in this
structure. For now there is simply a pointer to the kernel-wide
soft updates lock.

Change all instances of ACQUIRE_LOCK and FREE_LOCK to pass the lock
pointer in the mount_softdeps structure instead of a pointer to the
kernel-wide soft-updates lock.

Replace the five hash tables used by soft updates with per-filesystem
copies of these tables allocated in the mount_softdeps structure.

Several functions that flush dependencies when too many are allocated
in the kernel used to operate across all filesystems. They are now
parameterized to flush dependencies from a specified filesystem.
For now, we stick with the round-robin flushing strategy when the
kernel as a whole has too many dependencies allocated.

While there are many lines of changes, there should be no functional
change in the operation of soft updates.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix
sys/ufs/ffs/ffs_softdep.c
sys/ufs/ffs/softdep.h
sys/ufs/ufs/ufsmount.h