Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [vmlocking] src/sys



Module Name:    src
Committed By:   ad
Date:           Fri Aug 24 23:26:40 UTC 2007

Modified Files:
        src/sys/kern [vmlocking]: vfs_bio.c
        src/sys/sys [vmlocking]: buf.h

Log Message:
Redo the buffer cache locking, mostly as proposed on tech-kern with the
exception that buffers need not be associated with vnodes. Previously
b_interlock needed to be held for nearly every operation on a buffer, in
addition to other locks like bqueue_slock, and the scheme basically did
not work. There are now three locks:

bufcache_lock: protects global buffer cache state, including softdep.

B_BUSY: long term per-buffer lock that Unix has had for ~ever.

b_objlock: lock on completion (biowait vs biodone). For buffers associated
with vnodes this points to &vp->v_interlock, since in most places that
b_objlock is taken vnode state is also being modified. If no vnode it points
to a generic lock (buffer_lock).


To generate a diff of this commit:
cvs rdiff -r1.170.2.16 -r1.170.2.17 src/sys/kern/vfs_bio.c
cvs rdiff -r1.95.2.5 -r1.95.2.6 src/sys/sys/buf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index