cvs commit: src/sys/kern vfs_bio.c src/sys/sys buf.h src/sys/vfs/nfs nfs_bio.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Jan 9 23:35:49 PST 2008
dillon 2008/01/09 23:34:04 PST
DragonFly src repository
Modified files:
sys/kern vfs_bio.c
sys/sys buf.h
sys/vfs/nfs nfs_bio.c
Log:
Fix buffer cache deadlocks by splitting dirty buffers into two categories:
Light weight dirty buffers and heavy weight dirty buffers. Add a second
buffer cache flushing daemon to deal with the heavy weight dirty buffers.
Currently only HAMMER uses the new feature, but it can also easily be used
by UFS in the future.
Buffer cache deadlocks can occur in low memory situations where the buffer
cache tries to flush out dirty buffers and deadlocks when the act of
flushing a dirty buffer requires additional buffers to be acquired. Because
there was only one buffer flushing daemon, a deadlock on a heavy weight buffer
prevented any further buffer flushes, whether light or heavy weight, and
wound up deadlocking the entire system.
Giving the heavy weight buffers their own daemon solves the problem by
allowing light weight buffers to continue to be flushed even if a stall
occurs on a heavy weight buffer. The numbers of dirty heavy weight buffers
is limited to ensure that enough light weight buffers are available.
This is primarily implemented by changing getblk()'s mostly unused slpflag
parameter to a new blkflags parameter and adding a new buffer cache queue
called BQUEUE_DIRTY_HW.
Revision Changes Path
1.96 +200 -59 src/sys/kern/vfs_bio.c
1.42 +15 -1 src/sys/sys/buf.h
1.42 +1 -1 src/sys/vfs/nfs/nfs_bio.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_bio.c.diff?r1=1.95&r2=1.96&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/buf.h.diff?r1=1.41&r2=1.42&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_bio.c.diff?r1=1.41&r2=1.42&f=u
More information about the Commits
mailing list