From: Jeffrey Altman Date: Tue, 12 Dec 2006 17:02:37 +0000 (+0000) Subject: windows-sleep-when-out-of-buffers-20061212 X-Git-Tag: BP-openafs-windows-kdfs-ifs~922 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f126802236bb059b8f0e804c76aef1031beb8a44;p=packages%2Fo%2Fopenafs.git windows-sleep-when-out-of-buffers-20061212 When there are no free buffers, don't loop continuously. Sleep so that the other threads that are holding the buffers can grab the global buffer lock and release them. --- diff --git a/src/WINNT/afsd/cm_buf.c b/src/WINNT/afsd/cm_buf.c index e19ab0aae..9b790e51f 100644 --- a/src/WINNT/afsd/cm_buf.c +++ b/src/WINNT/afsd/cm_buf.c @@ -862,6 +862,7 @@ long buf_GetNewLocked(struct cm_scache *scp, osi_hyper_t *offsetp, cm_buf_t **bu return 0; } /* for all buffers in lru queue */ lock_ReleaseWrite(&buf_globalLock); + Sleep(100); /* give some time for a buffer to be freed */ } /* while loop over everything */ /* not reached */ } /* the proc */