]> git.michaelhowe.org Git - packages/o/openafs.git/commit
windows-dirty-buffer-optimization-20061128
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 29 Nov 2006 06:23:00 +0000 (06:23 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 29 Nov 2006 06:23:00 +0000 (06:23 +0000)
commitd253bde4574e34ee08cf326ec4c481b57c230476
tree477124e76e3f5da995f2407ebe3bac747c2138c2
parent1c661a198efca3b3273b1c523b19a367ddbee4d7
windows-dirty-buffer-optimization-20061128

The old dirty buffer synchronization algorithm had a buf_IncrSyncer
thread walking the all buffer list periodically searching for dirty
buffers to write to the file server.  This had several negative
results.  The alogirithm ate up ever increasing amounts of CPU time
even when AFS is idle as the size of the cache increases.  Also,
buffers were written to the file server in an order based upon the
original buffer allocation which has nothing to do with the order
in which the buffers became dirty.

The new algorithm maintains a dirty buffer list.  Items are added
when the buffer is originally marked dirty.  A buffer is only
removed from the list by the buf_IncrSyncer when the buffer is no
longer dirty.  If the list is empty the thread goes back to thread
immediately without additional processing requirements.
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_buf.h
src/WINNT/afsd/cm_memmap.c
src/WINNT/afsd/cm_memmap.h