OpenAFS CVS Commit: openafs/src/WINNT/afsd by jaltman

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Wed, 29 Nov 2006 01:23:00 EST


Update of /cvs/openafs/src/WINNT/afsd
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-1-3/src/WINNT/afsd

Modified Files:
	cm_buf.c cm_buf.h cm_memmap.c cm_memmap.h 
Log Message:
DELTA windows-dirty-buffer-optimization-20061128
AUTHOR jaltman@secure-endpoints.com

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.



--- DELTA config follows ---
windows-dirty-buffer-optimization-20061128 openafs/src/WINNT/afsd/cm_buf.c 1.41 1.42
windows-dirty-buffer-optimization-20061128 openafs/src/WINNT/afsd/cm_buf.h 1.15 1.16
windows-dirty-buffer-optimization-20061128 openafs/src/WINNT/afsd/cm_memmap.c 1.8 1.9
windows-dirty-buffer-optimization-20061128 openafs/src/WINNT/afsd/cm_memmap.h 1.3 1.4