]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-windows-dirty-buffer-optimization-20061128
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 29 Nov 2006 06:23:44 +0000 (06:23 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 29 Nov 2006 06:23:44 +0000 (06:23 +0000)
commita9ea20c2718bfd3837254e0b44301430d7d9e69d
tree8e99badb66e403a47a87775682ff03a9cc861ecd
parentf1938e51a35586c56a66749e096e30dcbffda033
DEVEL15-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.

(cherry picked from commit d253bde4574e34ee08cf326ec4c481b57c230476)
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_buf.h
src/WINNT/afsd/cm_memmap.c
src/WINNT/afsd/cm_memmap.h