DEVEL15-windows-buf-infinite-looping-on-dirty-buffers-20090607
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 19 Jun 2009 04:11:22 +0000 (04:11 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 19 Jun 2009 04:11:22 +0000 (04:11 +0000)
commitc6d246b6dc3badc7588651223f517c506766e0b0
treebd140641d96f8f48694234b0b5d80b3d24bd7fd2
parent4b3d2b109be4c8226de0409628674e3e1bc633c2
DEVEL15-windows-buf-infinite-looping-on-dirty-buffers-20090607

LICENSE MIT

If there are dirty buffers when the file server becomes unresponsive,
the cache manager will attempt to write them repeatedly resulting in
use of 100% of the cpu of the machine until the file server becomes
responsive.

This patch reduces the cpu utilization by ensuring that only the first
in a list of buffers on the same file needs to fail with timed out,
all down, all busy, all offline, or clock skew.  The other dirty buffers
will just be skipped.  A small delay is enforced in the buf_IncrSync
thread between invocation.

This patch is not a complete fix for the problem.  The buf_IncrSync
thread needs to become more intelligent in order to avoid attempts to
write to volumes that are known to be inaccessible.

(cherry picked from commit bada49cff904c1e783ca9fa81a92036ceae7378d)
src/WINNT/afsd/cm_buf.c